comparison test/Makefile.am @ 30808:2637e294ea6b stable

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.
author John W. Eaton <jwe@octave.org>
date Thu, 03 Mar 2022 15:01:32 -0500
parents test/module.mk@75fb18f0469a
children c62c8717ebf6
comparison
equal deleted inserted replaced
30806:103efb7e1600 30808:2637e294ea6b
1 BUILT_SOURCES =
2 DIRSTAMP_FILES =
3 EXTRA_DIST =
4 CLEANFILES =
5 DISTCLEANFILES =
6 MAINTAINERCLEANFILES =
7 TEST_FILES =
8 noinst_TEST_FILES =
9
10 TEST_FILES += \
11 fntests.m \
12 args.tst \
13 bug-31371.tst \
14 bug-40117.tst \
15 bug-45969.tst \
16 bug-45972.tst \
17 bug-46330.tst \
18 bug-49904.tst \
19 bug-53579.tst \
20 bug-53599.tst \
21 bug-54490.tst \
22 bug-55308.tst \
23 bug-55321.tst \
24 bug-55322.tst \
25 bug-59950.tst \
26 bug-61201.tst \
27 colormaps.tst \
28 command.tst \
29 complex.tst \
30 deprecate-props.tst \
31 diag-perm.tst \
32 error.tst \
33 eval-catch.tst \
34 eval-command.tst \
35 for.tst \
36 func.tst \
37 global.tst \
38 if.tst \
39 index.tst \
40 inline-fcn.tst \
41 integer.tst \
42 io.tst \
43 leftdiv.tst \
44 line-continue.tst \
45 logical-index.tst \
46 null-assign.tst \
47 parser.tst \
48 prefer.tst \
49 range.tst \
50 recursion.tst \
51 return.tst \
52 single-index.tst \
53 slice.tst \
54 sparse-assign.tst \
55 struct.tst \
56 switch.tst \
57 system.tst \
58 transpose.tst \
59 try.tst \
60 unwind.tst \
61 while.tst
62
63 DIRSTAMP_FILES += $(octave_dirstamp)
64
65 include bug-35448/module.mk
66 include bug-35881/module.mk
67 include bug-36025/module.mk
68 include bug-38236/module.mk
69 include bug-38691/module.mk
70 include bug-41723/module.mk
71 include bug-44940/module.mk
72 include bug-45351/module.mk
73 include bug-46660/module.mk
74 include bug-47680/module.mk
75 include bug-49379/module.mk
76 include bug-50014/module.mk
77 include bug-50035/module.mk
78 include bug-50716/module.mk
79 include bug-50831/module.mk
80 include bug-51192/module.mk
81 include bug-51532/module.mk
82 include bug-51534/module.mk
83 include bug-51599/module.mk
84 include bug-52075/module.mk
85 include bug-52722/module.mk
86 include bug-52851/module.mk
87 include bug-53027/module.mk
88 include bug-53468/module.mk
89 include bug-53956/module.mk
90 include bug-54995/module.mk
91 include bug-55758/module.mk
92 include bug-56068/module.mk
93 include bug-58572/module.mk
94 include bug-58593/module.mk
95 include bug-59451/module.mk
96 include bug-59617/module.mk
97 include bug-59661/module.mk
98 include bug-59704/module.mk
99 include bug-59937/module.mk
100 include bug-60237/module.mk
101 include bug-60882/module.mk
102 include bug-61105/module.mk
103 include bug-61191/module.mk
104 include class-concat/module.mk
105 include classdef/module.mk
106 include classdef-multiple-inheritance/module.mk
107 include classes/module.mk
108 include colon-op/module.mk
109 include ctor-vs-method/module.mk
110 include fcn-handle/module.mk
111 include json/module.mk
112 include jupyter-notebook/module.mk
113 include local-functions/module.mk
114 include mex/module.mk
115 include nest/module.mk
116 include private-functions/module.mk
117 include publish/module.mk
118 include pkg/module.mk
119
120 define run-octave-tests
121 ( $(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 ) && \
122 if $(AM_V_P); then \
123 echo ""; \
124 if [ -f fntests.log ]; then \
125 echo "Contents of test/fntests.log:"; \
126 echo ""; \
127 $(AWK) -f $(srcdir)/show-failures.awk fntests.log; \
128 else \
129 echo "fntests.log is missing!"; \
130 fi; \
131 fi
132 endef
133
134 check-local: $(GENERATED_TEST_FILES) $(MEX_TEST_FUNCTIONS) | $(OCTAVE_INTERPRETER_TARGETS) $(octave_dirstamp)
135 $(AM_V_at)$(call run-octave-tests)
136
137 COVERAGE_DIR = coverage
138 COVERAGE_INFO = $(COVERAGE_DIR)/$(PACKAGE).info
139
140 ## FIXME: To get something useful out of 'make coverage', you should use gcc
141 ## and configure with compiler flags set to '-g --coverage'. Adding the
142 ## --coverage option to either WARN_CXXFLAGS or XTRA_CXXFLAGS resulted in
143 ## link errors, so some work still needed to get a '--enable-coverage-flags'
144 ## option working.
145
146 coverage: all
147 lcov --directory . --zerocounters
148 $(MAKE) $(AM_MAKEFLAGS) check
149 $(MKDIR_P) $(COVERAGE_DIR)
150 lcov --directory . --capture --output-file $(COVERAGE_INFO)
151 genhtml --output-directory $(COVERAGE_DIR) $(COVERAGE_INFO)
152 @echo ""
153 @echo "Code coverage report successfully built. Open the file"
154 @echo ""
155 @echo " $(abs_top_builddir)/$(COVERAGE_DIR)/index.html"
156 @echo ""
157 @echo "in a web browser to view the results."
158 @echo ""
159 .PHONY: coverage
160
161 conv.tst: mk-conv-tst.sh | $(octave_dirstamp)
162 $(AM_V_GEN)rm -f $@-t $@ && \
163 $(SHELL) $(srcdir)/mk-conv-tst.sh > $@-t && \
164 mv $@-t $@
165
166 sparse.tst: mk-sparse-tst.sh | $(octave_dirstamp)
167 $(AM_V_GEN)rm -f $@-t $@ && \
168 $(SHELL) $(srcdir)/mk-sparse-tst.sh > $@-t && \
169 mv $@-t $@
170
171 GENERATED_BC_OVERLOADS_DIRS := \
172 $(shell $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test --list-dirs)
173
174 GENERATED_BC_OVERLOADS_FILES := \
175 $(shell $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test --list-files)
176
177 $(GENERATED_BC_OVERLOADS_FILES): mk-bc-overloads-tst-stamp
178
179 .bc-overload-tests-stamp: mk-bc-overloads-tst.sh bc-overloads-expected | $(octave_dirstamp)
180 $(AM_V_GEN)rm -f $@ && \
181 $(SHELL) $(srcdir)/mk-bc-overloads-tst.sh test $(srcdir)/bc-overloads-expected && \
182 touch $@
183
184 GENERATED_TEST_FILES = \
185 conv.tst \
186 sparse.tst \
187 .bc-overload-tests-stamp
188
189 fixedtestsdir := $(octtestsdir)/fixed
190
191 TEST_INST_FILES = \
192 conv.tst \
193 sparse.tst \
194 $(GENERATED_BC_OVERLOADS_FILES) \
195 $(filter-out fntests.m, $(TEST_FILES))
196
197 install-data-local: install-test-files
198
199 uninstall-local: uninstall-test-files
200
201 install-test-files:
202 for f in $(TEST_INST_FILES); do \
203 if test -f "$$f"; then d=; else d="$(srcdir)/"; fi; \
204 $(MKDIR_P) $(DESTDIR)$(fixedtestsdir)/`echo $$f | $(SED) 's,/*[^/]*$$,,'`; \
205 $(INSTALL_DATA) $$d$$f $(DESTDIR)$(fixedtestsdir)/$$f; \
206 done
207 .PHONY: install-test-files
208
209 uninstall-test-files:
210 for f in $(TEST_INST_FILES); do \
211 rm -f $(DESTDIR)$(fixedtestsdir)/$$f; \
212 done
213 .PHONY: uninstall-test-files
214
215 BUILT_SOURCES += $(GENERATED_TEST_FILES)
216
217 EXTRA_DIST += \
218 bc-overloads-expected \
219 mk-bc-overloads-tst.sh \
220 mk-conv-tst.sh \
221 mk-sparse-tst.sh \
222 mk_bc_overloads_expected.m \
223 show-failures.awk \
224 $(addprefix $(srcdir)/, $(TEST_FILES)) \
225 $(addprefix $(srcdir)/, $(noinst_TEST_FILES)) \
226 $(MEX_TEST_SRC)
227
228 CLEANFILES += \
229 $(GENERATED_BC_OVERLOADS_FILES) \
230 $(GENERATED_TEST_FILES)
231
232 DISTCLEANFILES += \
233 fntests.log
234
235 clean-local: test-clean
236
237 test-clean:
238 rm -f $(CLEANFILES)
239 rm -rf $(GENERATED_BC_OVERLOADS_DIRS)
240 rm -rf $(COVERAGE_DIR)
241 rm -rf $(MEX_TEST_FUNCTIONS)
242
243 test-distclean: test-clean
244 rm -f $(DISTCLEANFILES)
245
246 test-maintainer-clean: test-distclean
247 rm -f $(MAINTAINERCLEANFILES)