[m-rev.] diff: fix recompilation test failure with --use-subdirs

Simon Taylor stayl at cs.mu.OZ.AU
Wed Aug 1 03:00:12 AEST 2001


Estimated hours taken: 0.25

Fix failure of tests/recompilation/no_version_numbers_r
with `--use-subdirs'.

tests/recompilation/test_functions:
	Before checking the expected output in the `.err' file,
	filter out all references to the `Mercury/*/' directories
	created by `--use-subdirs'.

Index: test_functions
===================================================================
RCS file: /home/mercury1/repository/tests/recompilation/test_functions,v
retrieving revision 1.4
diff -u -u -r1.4 test_functions
--- test_functions	2001/07/28 16:01:08	1.4
+++ test_functions	2001/07/31 16:59:17
@@ -177,7 +177,11 @@
 
 	# In `.hl*' grades, the compiler sometimes puts an extra line in
 	# the `.err' file ("foo.h has CHANGED"). Filter it out here.
-	grep -v "has CHANGED" $module.err > $module.err2
+	# Also filter out any references to the directories created by the
+	# `--use-subdirs' option.
+	sed	-e '/has CHANGED/d' \
+		-e 's/Mercury\/.*\///g' \
+		$module.err > $module.err2
 	mv $module.err2 $module.err
 
 	compare_files $module.err_exp.$error_file_version $module.err
--------------------------------------------------------------------------
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