]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Remove output file if test failed.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Oct 2003 14:18:35 +0000 (14:18 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 16 Oct 2003 14:18:35 +0000 (14:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@8094 0785d39b-7218-0410-832d-ea1e28bc413d

tests/Makefile.rules

index add7c04845cf7bf54600c333ba26621156e43811..413175082fd7322d5aca1e569bfe24fcc8ba768b 100644 (file)
@@ -50,11 +50,19 @@ endif
 # Since the test suite is usually run automatically, we
 # impose a maximum run time of 30 CPU minutes for each
 # program.
+#
+# In the line after we execute the program, we make sure that
+# the program terminated without error code; otherwise delete
+# the output file and stop the make command. This is done so
+# that when you run make for that output file again later
+# then make would not say that the output file is up to
+# date and does not need to be regenerated
 ############################################################
 
 %.output : %.exe
        @echo =====Running======= $<
-       @ulimit -t 2400 ; ./$<
+       @ulimit -t 2400 ; ./$< ; \
+         if test ! $$? == 0 ; then rm $@ ; false ; fi
        @perl -pi $(normalize)  $@
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.