[m-rev.] diff: fix recompilation test case failure

Simon Taylor stayl at cs.mu.OZ.AU
Thu Jul 12 17:55:32 AEST 2001



Estimated hours taken: 0.25
Branches: main

tests/recompilation/Mmakefile:
tests/recompilation/TESTS:
tests/recompilation/runtests:
	Parallel mmake does not work with nested sub-modules,
	so disable it for tests containing nested sub-modules.


Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/Mmakefile,v
retrieving revision 1.3
diff -u -u -r1.3 Mmakefile
--- Mmakefile	2001/06/29 08:10:43	1.3
+++ Mmakefile	2001/07/12 07:11:46
@@ -12,7 +12,7 @@
 
 realclean_local:
 	. ./TESTS; \
-	for module in $$TESTS_SHOULD_SUCCEED $$TESTS_SHOULD_FAIL; do \
+	for module in $$ALL_TESTS; do \
 		rm -rf $$module.m $${module}_2.m ;\
 	done
 
Index: TESTS
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/TESTS,v
retrieving revision 1.1
diff -u -u -r1.1 TESTS
--- TESTS	2001/06/27 05:04:44	1.1
+++ TESTS	2001/07/12 07:37:55
@@ -14,14 +14,22 @@
 	func_overloading_nr \
 	func_overloading_r \
 	lambda_mode_r \
-	nested_module_r \
 	no_version_numbers_r \
 	pragma_type_spec_r \
 	pred_ctor_ambiguity_r \
 	pred_overloading_r"
 
+# Parallel mmake with nested sub-modules is broken.
+# The commands to create `.c' files from the `.m' file containing the
+# nested sub-module are run twice, resulting in incorrect output in
+# the `.err' file.
+NO_PARALLEL_MAKE_TESTS="\
+	nested_module_r
+"
+
 TESTS_SHOULD_FAIL="\
 	add_type_re \
 	remove_type_re \
 	type_qual_re"
 
+ALL_TESTS=$TESTS_SHOULD_SUCCEED $NO_PARALLEL_MAKE_TESTS $TESTS_SHOULD_FAIL
Index: runtests
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/runtests,v
retrieving revision 1.2
diff -u -u -r1.2 runtests
--- runtests	2001/06/29 08:10:44	1.2
+++ runtests	2001/07/12 07:52:36
@@ -45,6 +45,16 @@
 run_all_tests false $TESTS_SHOULD_SUCCEED
 run_all_tests true $TESTS_SHOULD_FAIL
 
+# Parallel mmake does not work with nested sub-modules,
+# so disable it for tests which contain nested sub-modules.
+oldmmakeopts="$mmakeopts"
+mmakeopts="$mmakeopts -j1"
+export mmakeopts
+run_all_tests false $NO_PARALLEL_MAKE_TESTS
+
+mmakeopts=$oldmmakeopts
+export mmakeopts
+
 cat *.res > .allres
 if [ "$failing_tests" = "" -a ! -s .allres ]
 then
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list