# HG changeset patch # User John W. Eaton # Date 1646337692 18000 # Node ID 2637e294ea6b3b860d154e5698d26494c08905b2 # Parent 103efb7e16004273b642939c4f923f1223dcecdc fix botched file rename from previous change * test/Makefile.am: Rename from test/module.mk. Adjust filenames and commands so they will work when executed in the $builddir/test directory. diff -r 103efb7e1600 -r 2637e294ea6b test/Makefile.am --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/Makefile.am Thu Mar 03 15:01:32 2022 -0500 @@ -0,0 +1,247 @@ +BUILT_SOURCES = +DIRSTAMP_FILES = +EXTRA_DIST = +CLEANFILES = +DISTCLEANFILES = +MAINTAINERCLEANFILES = +TEST_FILES = +noinst_TEST_FILES = + +TEST_FILES += \ + fntests.m \ + args.tst \ + bug-31371.tst \ + bug-40117.tst \ + bug-45969.tst \ + bug-45972.tst \ + bug-46330.tst \ + bug-49904.tst \ + bug-53579.tst \ + bug-53599.tst \ + bug-54490.tst \ + bug-55308.tst \ + bug-55321.tst \ + bug-55322.tst \ + bug-59950.tst \ + bug-61201.tst \ + colormaps.tst \ + command.tst \ + complex.tst \ + deprecate-props.tst \ + diag-perm.tst \ + error.tst \ + eval-catch.tst \ + eval-command.tst \ + for.tst \ + func.tst \ + global.tst \ + if.tst \ + index.tst \ + inline-fcn.tst \ + integer.tst \ + io.tst \ + leftdiv.tst \ + line-continue.tst \ + logical-index.tst \ + null-assign.tst \ + parser.tst \ + prefer.tst \ + range.tst \ + recursion.tst \ + return.tst \ + single-index.tst \ + slice.tst \ + sparse-assign.tst \ + struct.tst \ + switch.tst \ + system.tst \ + transpose.tst \ + try.tst \ + unwind.tst \ + while.tst + +DIRSTAMP_FILES += $(octave_dirstamp) + +include bug-35448/module.mk +include bug-35881/module.mk +include bug-36025/module.mk +include bug-38236/module.mk +include bug-38691/module.mk +include bug-41723/module.mk +include bug-44940/module.mk +include bug-45351/module.mk +include bug-46660/module.mk +include bug-47680/module.mk +include bug-49379/module.mk +include bug-50014/module.mk +include bug-50035/module.mk +include bug-50716/module.mk +include bug-50831/module.mk +include bug-51192/module.mk +include bug-51532/module.mk +include bug-51534/module.mk +include bug-51599/module.mk +include bug-52075/module.mk +include bug-52722/module.mk +include bug-52851/module.mk +include bug-53027/module.mk +include bug-53468/module.mk +include bug-53956/module.mk +include bug-54995/module.mk +include bug-55758/module.mk +include bug-56068/module.mk +include bug-58572/module.mk +include bug-58593/module.mk +include bug-59451/module.mk +include bug-59617/module.mk +include bug-59661/module.mk +include bug-59704/module.mk +include bug-59937/module.mk +include bug-60237/module.mk +include bug-60882/module.mk +include bug-61105/module.mk +include bug-61191/module.mk +include class-concat/module.mk +include classdef/module.mk +include classdef-multiple-inheritance/module.mk +include classes/module.mk +include colon-op/module.mk +include ctor-vs-method/module.mk +include fcn-handle/module.mk +include json/module.mk +include jupyter-notebook/module.mk +include local-functions/module.mk +include mex/module.mk +include nest/module.mk +include private-functions/module.mk +include publish/module.mk +include pkg/module.mk + +define run-octave-tests + ( $(SHELL) ../run-octave $(RUN_OCTAVE_OPTIONS) $(1) --no-init-file --silent --no-history -p $(abs_top_builddir)/test/mex $(abs_top_srcdir)/test/fntests.m $(abs_top_srcdir)/test ) && \ + if $(AM_V_P); then \ + echo ""; \ + if [ -f fntests.log ]; then \ + echo "Contents of test/fntests.log:"; \ + echo ""; \ + $(AWK) -f $(srcdir)/show-failures.awk fntests.log; \ + else \ + echo "fntests.log is missing!"; \ + fi; \ + fi +endef + +check-local: $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) $(octave_dirstamp) + $(AM_V_at)$(call run-octave-tests) + +COVERAGE_DIR = coverage +COVERAGE_INFO = $(COVERAGE_DIR)/$(PACKAGE).info + +## FIXME: To get something useful out of 'make coverage', you should use gcc +## and configure with compiler flags set to '-g --coverage'. Adding the +## --coverage option to either WARN_CXXFLAGS or XTRA_CXXFLAGS resulted in +## link errors, so some work still needed to get a '--enable-coverage-flags' +## option working. + +coverage: all + lcov --directory . --zerocounters + $(MAKE) $(AM_MAKEFLAGS) check + $(MKDIR_P) $(COVERAGE_DIR) + lcov --directory . --capture --output-file $(COVERAGE_INFO) + genhtml --output-directory $(COVERAGE_DIR) $(COVERAGE_INFO) + @echo "" + @echo "Code coverage report successfully built. Open the file" + @echo "" + @echo " $(abs_top_builddir)/$(COVERAGE_DIR)/index.html" + @echo "" + @echo "in a web browser to view the results." + @echo "" +.PHONY: coverage + +conv.tst: mk-conv-tst.sh | $(octave_dirstamp) + $(AM_V_GEN)rm -f $@-t $@ && \ + $(SHELL) $(srcdir)/mk-conv-tst.sh > $@-t && \ + mv $@-t $@ + +sparse.tst: mk-sparse-tst.sh | $(octave_dirstamp) + $(AM_V_GEN)rm -f $@-t $@ && \ + $(SHELL) $(srcdir)/mk-sparse-tst.sh > $@-t && \ + mv $@-t $@ + +GENERATED_BC_OVERLOADS_DIRS := \ + $(shell $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test --list-dirs) + +GENERATED_BC_OVERLOADS_FILES := \ + $(shell $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test --list-files) + +$(GENERATED_BC_OVERLOADS_FILES): mk-bc-overloads-tst-stamp + +.bc-overload-tests-stamp: mk-bc-overloads-tst.sh bc-overloads-expected | $(octave_dirstamp) + $(AM_V_GEN)rm -f $@ && \ + $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test $(srcdir)/bc-overloads-expected && \ + touch $@ + +GENERATED_TEST_FILES = \ + conv.tst \ + sparse.tst \ + .bc-overload-tests-stamp + +fixedtestsdir := $(octtestsdir)/fixed + +TEST_INST_FILES = \ + conv.tst \ + sparse.tst \ + $(GENERATED_BC_OVERLOADS_FILES) \ + $(filter-out fntests.m, $(TEST_FILES)) + +install-data-local: install-test-files + +uninstall-local: uninstall-test-files + +install-test-files: + for f in $(TEST_INST_FILES); do \ + if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \ + $(MKDIR_P) $(DESTDIR)$(fixedtestsdir)/`echo $$f | $(SED) 's,/*[^/]*$$,,'`; \ + $(INSTALL_DATA) $$d$$f $(DESTDIR)$(fixedtestsdir)/$$f; \ + done +.PHONY: install-test-files + +uninstall-test-files: + for f in $(TEST_INST_FILES); do \ + rm -f $(DESTDIR)$(fixedtestsdir)/$$f; \ + done +.PHONY: uninstall-test-files + +BUILT_SOURCES += $(GENERATED_TEST_FILES) + +EXTRA_DIST += \ + bc-overloads-expected \ + mk-bc-overloads-tst.sh \ + mk-conv-tst.sh \ + mk-sparse-tst.sh \ + mk_bc_overloads_expected.m \ + show-failures.awk \ + $(addprefix $(srcdir)/, $(TEST_FILES)) \ + $(addprefix $(srcdir)/, $(noinst_TEST_FILES)) \ + $(MEX_TEST_SRC) + +CLEANFILES += \ + $(GENERATED_BC_OVERLOADS_FILES) \ + $(GENERATED_TEST_FILES) + +DISTCLEANFILES += \ + fntests.log + +clean-local: test-clean + +test-clean: + rm -f $(CLEANFILES) + rm -rf $(GENERATED_BC_OVERLOADS_DIRS) + rm -rf $(COVERAGE_DIR) + rm -rf $(MEX_TEST_FUNCTIONS) + +test-distclean: test-clean + rm -f $(DISTCLEANFILES) + +test-maintainer-clean: test-distclean + rm -f $(MAINTAINERCLEANFILES) diff -r 103efb7e1600 -r 2637e294ea6b test/module.mk --- a/test/module.mk Thu Mar 03 13:31:24 2022 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -%canon_reldir%_EXTRA_DIST = - -%canon_reldir%_CLEANFILES = -%canon_reldir%_DISTCLEANFILES = -%canon_reldir%_MAINTAINERCLEANFILES = - -TEST_FILES += \ - %reldir%/fntests.m \ - %reldir%/args.tst \ - %reldir%/bug-31371.tst \ - %reldir%/bug-40117.tst \ - %reldir%/bug-45969.tst \ - %reldir%/bug-45972.tst \ - %reldir%/bug-46330.tst \ - %reldir%/bug-49904.tst \ - %reldir%/bug-53579.tst \ - %reldir%/bug-53599.tst \ - %reldir%/bug-54490.tst \ - %reldir%/bug-55308.tst \ - %reldir%/bug-55321.tst \ - %reldir%/bug-55322.tst \ - %reldir%/bug-59950.tst \ - %reldir%/bug-61201.tst \ - %reldir%/colormaps.tst \ - %reldir%/command.tst \ - %reldir%/complex.tst \ - %reldir%/deprecate-props.tst \ - %reldir%/diag-perm.tst \ - %reldir%/error.tst \ - %reldir%/eval-catch.tst \ - %reldir%/eval-command.tst \ - %reldir%/for.tst \ - %reldir%/func.tst \ - %reldir%/global.tst \ - %reldir%/if.tst \ - %reldir%/index.tst \ - %reldir%/inline-fcn.tst \ - %reldir%/integer.tst \ - %reldir%/io.tst \ - %reldir%/leftdiv.tst \ - %reldir%/line-continue.tst \ - %reldir%/logical-index.tst \ - %reldir%/null-assign.tst \ - %reldir%/parser.tst \ - %reldir%/prefer.tst \ - %reldir%/range.tst \ - %reldir%/recursion.tst \ - %reldir%/return.tst \ - %reldir%/single-index.tst \ - %reldir%/slice.tst \ - %reldir%/sparse-assign.tst \ - %reldir%/struct.tst \ - %reldir%/switch.tst \ - %reldir%/system.tst \ - %reldir%/transpose.tst \ - %reldir%/try.tst \ - %reldir%/unwind.tst \ - %reldir%/while.tst - -DIRSTAMP_FILES += %reldir%/$(octave_dirstamp) - -include %reldir%/bug-35448/module.mk -include %reldir%/bug-35881/module.mk -include %reldir%/bug-36025/module.mk -include %reldir%/bug-38236/module.mk -include %reldir%/bug-38691/module.mk -include %reldir%/bug-41723/module.mk -include %reldir%/bug-44940/module.mk -include %reldir%/bug-45351/module.mk -include %reldir%/bug-46660/module.mk -include %reldir%/bug-47680/module.mk -include %reldir%/bug-49379/module.mk -include %reldir%/bug-50014/module.mk -include %reldir%/bug-50035/module.mk -include %reldir%/bug-50716/module.mk -include %reldir%/bug-50831/module.mk -include %reldir%/bug-51192/module.mk -include %reldir%/bug-51532/module.mk -include %reldir%/bug-51534/module.mk -include %reldir%/bug-51599/module.mk -include %reldir%/bug-52075/module.mk -include %reldir%/bug-52722/module.mk -include %reldir%/bug-52851/module.mk -include %reldir%/bug-53027/module.mk -include %reldir%/bug-53468/module.mk -include %reldir%/bug-53956/module.mk -include %reldir%/bug-54995/module.mk -include %reldir%/bug-55758/module.mk -include %reldir%/bug-56068/module.mk -include %reldir%/bug-58572/module.mk -include %reldir%/bug-58593/module.mk -include %reldir%/bug-59451/module.mk -include %reldir%/bug-59617/module.mk -include %reldir%/bug-59661/module.mk -include %reldir%/bug-59704/module.mk -include %reldir%/bug-59937/module.mk -include %reldir%/bug-60237/module.mk -include %reldir%/bug-60882/module.mk -include %reldir%/bug-61105/module.mk -include %reldir%/bug-61191/module.mk -include %reldir%/class-concat/module.mk -include %reldir%/classdef/module.mk -include %reldir%/classdef-multiple-inheritance/module.mk -include %reldir%/classes/module.mk -include %reldir%/colon-op/module.mk -include %reldir%/ctor-vs-method/module.mk -include %reldir%/fcn-handle/module.mk -include %reldir%/json/module.mk -include %reldir%/jupyter-notebook/module.mk -include %reldir%/local-functions/module.mk -include %reldir%/mex/module.mk -include %reldir%/nest/module.mk -include %reldir%/private-functions/module.mk -include %reldir%/publish/module.mk -include %reldir%/pkg/module.mk - -define run-octave-tests - ( cd %reldir% && $(SHELL) ../run-octave $(RUN_OCTAVE_OPTIONS) $(1) --no-init-file --silent --no-history -p $(abs_top_builddir)/%reldir%/mex $(abs_top_srcdir)/%reldir%/fntests.m $(abs_top_srcdir)/%reldir% ) && \ - if $(AM_V_P); then \ - echo ""; \ - if [ -f %reldir%/fntests.log ]; then \ - echo "Contents of %reldir%/fntests.log:"; \ - echo ""; \ - $(AWK) -f $(srcdir)/%reldir%/show-failures.awk %reldir%/fntests.log; \ - else \ - echo "%reldir%/fntests.log is missing!"; \ - fi; \ - fi -endef - -check-local: $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) %reldir%/$(octave_dirstamp) - $(AM_V_at)$(call run-octave-tests) - -COVERAGE_DIR = %reldir%/coverage -COVERAGE_INFO = $(COVERAGE_DIR)/$(PACKAGE).info - -## FIXME: To get something useful out of 'make coverage', you should use gcc -## and configure with compiler flags set to '-g --coverage'. Adding the -## --coverage option to either WARN_CXXFLAGS or XTRA_CXXFLAGS resulted in -## link errors, so some work still needed to get a '--enable-coverage-flags' -## option working. - -coverage: all - lcov --directory . --zerocounters - $(MAKE) $(AM_MAKEFLAGS) check - $(MKDIR_P) $(COVERAGE_DIR) - lcov --directory . --capture --output-file $(COVERAGE_INFO) - genhtml --output-directory $(COVERAGE_DIR) $(COVERAGE_INFO) - @echo "" - @echo "Code coverage report successfully built. Open the file" - @echo "" - @echo " $(abs_top_builddir)/$(COVERAGE_DIR)/index.html" - @echo "" - @echo "in a web browser to view the results." - @echo "" -.PHONY: coverage - -%reldir%/conv.tst: %reldir%/mk-conv-tst.sh | %reldir%/$(octave_dirstamp) - $(AM_V_GEN)rm -f $@-t $@ && \ - $(SHELL) $(srcdir)/%reldir%/mk-conv-tst.sh > $@-t && \ - mv $@-t $@ - -%reldir%/sparse.tst: %reldir%/mk-sparse-tst.sh | %reldir%/$(octave_dirstamp) - $(AM_V_GEN)rm -f $@-t $@ && \ - $(SHELL) $(srcdir)/%reldir%/mk-sparse-tst.sh > $@-t && \ - mv $@-t $@ - -GENERATED_BC_OVERLOADS_DIRS := \ - $(shell $(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test --list-dirs) - -GENERATED_BC_OVERLOADS_FILES := \ - $(shell $(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test --list-files) - -$(GENERATED_BC_OVERLOADS_FILES): %reldir%/mk-bc-overloads-tst-stamp - -%reldir%/.bc-overload-tests-stamp: %reldir%/mk-bc-overloads-tst.sh %reldir%/bc-overloads-expected | %reldir%/$(octave_dirstamp) - $(AM_V_GEN)rm -f $@ && \ - $(SHELL) $(srcdir)/%reldir%/mk-bc-overloads-tst.sh test $(srcdir)/%reldir%/bc-overloads-expected && \ - touch $@ - -GENERATED_TEST_FILES = \ - %reldir%/conv.tst \ - %reldir%/sparse.tst \ - %reldir%/.bc-overload-tests-stamp - -fixedtestsdir := $(octtestsdir)/fixed - -TEST_INST_FILES = \ - %reldir%/conv.tst \ - %reldir%/sparse.tst \ - $(GENERATED_BC_OVERLOADS_FILES) \ - $(filter-out %reldir%/fntests.m, $(TEST_FILES)) - -install-data-local: install-test-files - -uninstall-local: uninstall-test-files - -install-test-files: - for f in $(TEST_INST_FILES); do \ - if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \ - base=`echo $$f | $(SED) 's,^%reldir%/,,'`; \ - $(MKDIR_P) $(DESTDIR)$(fixedtestsdir)/`echo $$base | $(SED) 's,/*[^/]*$$,,'`; \ - $(INSTALL_DATA) $$d$$f $(DESTDIR)$(fixedtestsdir)/$$base; \ - done -.PHONY: install-test-files - -uninstall-test-files: - for f in $(TEST_INST_FILES); do \ - base=`echo $$f | $(SED) 's,^%reldir%/,,'`; \ - rm -f $(DESTDIR)$(fixedtestsdir)/$$base; \ - done -.PHONY: uninstall-test-files - -BUILT_SOURCES += $(GENERATED_TEST_FILES) - -%canon_reldir%_EXTRA_DIST += \ - %reldir%/bc-overloads-expected \ - %reldir%/mk-bc-overloads-tst.sh \ - %reldir%/mk-conv-tst.sh \ - %reldir%/mk-sparse-tst.sh \ - %reldir%/mk_bc_overloads_expected.m \ - %reldir%/show-failures.awk \ - $(TEST_FILES) \ - $(noinst_TEST_FILES) \ - $(MEX_TEST_SRC) - -EXTRA_DIST += $(%canon_reldir%_EXTRA_DIST) - -%canon_reldir%_CLEANFILES += \ - $(GENERATED_BC_OVERLOADS_FILES) \ - $(GENERATED_TEST_FILES) - -%canon_reldir%_DISTCLEANFILES += \ - %reldir%/fntests.log - -CLEANFILES += $(%canon_reldir%_CLEANFILES) -DISTCLEANFILES += $(%canon_reldir%_DISTCLEANFILES) -MAINTAINERCLEANFILES += $(%canon_reldir%_MAINTAINERCLEANFILES) - -clean-local: test-clean - -test-clean: - rm -f $(%canon_reldir%_CLEANFILES) - rm -rf $(GENERATED_BC_OVERLOADS_DIRS) - rm -rf $(COVERAGE_DIR) - rm -rf $(MEX_TEST_FUNCTIONS) - -test-distclean: test-clean - rm -f $(%canon_reldir%_DISTCLEANFILES) - -test-maintainer-clean: test-distclean - rm -f $(%canon_reldir%_MAINTAINERCLEANFILES)