]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use the output files that are now in subdirectories, rather than in results/
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 11 Nov 2005 14:19:04 +0000 (14:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 11 Nov 2005 14:19:04 +0000 (14:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@11760 0785d39b-7218-0410-832d-ea1e28bc413d

tests/Makefile
tests/Makefile.rules

index c9d7cc2e1a6a7251e7f58be553d0e332ec81c92a..cbba80f2c3bb41db35f2da45230fe23bae8b5617 100644 (file)
@@ -2,33 +2,33 @@
 # Makefile,v 1.14 2002/09/19 13:53:47 wolf Exp
 # Common Makefile for all test directories
 
-all: compare base lac fe deal.II multigrid bits
+all: base lac fe deal.II multigrid bits
 
-base: compare abort.o
+base: abort.o
        cd base ; $(MAKE)
 
-lac: compare abort.o
+lac: abort.o
        cd lac ; $(MAKE)
 
-fe: compare abort.o
+fe: abort.o
        cd fe ; $(MAKE)
 
-bits: compare abort.o
+bits: abort.o
        cd bits ; $(MAKE)
 
-deal.II: compare abort.o
+deal.II: abort.o
        cd deal.II ; $(MAKE)
 
-multigrid: compare abort.o
+multigrid: abort.o
        cd multigrid ; $(MAKE)
 
-report: compare abort.o
+report: abort.o
        @for i in base lac fe deal.II multigrid bits all-headers ; do \
                echo =======Report: $$i ======= ; \
                cd $$i ; $(MAKE) report ; cd .. ; \
         done
 
-report+mail: compare abort.o
+report+mail: abort.o
        @for i in base lac fe deal.II multigrid bits all-headers ; do \
                echo =======Report: $$i ======= ; \
                cd $$i ; $(MAKE) report+mail ; cd .. ; \
@@ -84,23 +84,6 @@ output-multigrid: abort.o
 
 
 
-# generate a link to system specific test program output. we create
-# the name out of the system and compiler. unfortunately, for intel
-# compilers, the variable $(GXX-VERSION) reads intel_icc7.1 (with
-# proper version number), while for some historic reason we have named
-# the directories in the results/ tree with just icc7.1 (i.e. without
-# the preceding intel_). Thus, strip this part of the compiler name
-#
-# We declare this target as PHONY since we want it to re-run every time we
-# start the testsuite. Reason being that this way we can make sure that all
-# the proper links have been set for this run, even if some new tests have
-# been added.
-compare:
-       cd results; $(MAKE)
-       rm -f compare
-       ln -s results/$(TARGET)+$(GXX-VERSION:intel_%=%) compare
-.PHONY: compare
-
 resultname:
        @echo $(TARGET)+$(GXX-VERSION)
 
index b555036c7e04e75d9875c1fcd081e74546341102..44ebff7e59bda318b55935b7551499cfc1b49c42 100644 (file)
@@ -14,6 +14,10 @@ WORKDIR = $(notdir $(shell pwd))
 
 verbose = off
 
+
+PLATFORM = $(TARGET)+$(GXX-VERSION:intel_%=%)
+PLATFORM-HIERARCHY = $(shell $(PERL) ../hierarchy.pl $(PLATFORM))
+
 ############################################################
 # First how to create executables, including all necessary
 # flags:
@@ -72,7 +76,7 @@ endif
 # files. In default mode, do not show diffs as they are 
 # usually overly verbose. Only if user calls `make' with
 # flag `verbose=on' show the diffs. Also note that we
-# usually let the call to `make# continue even if we
+# usually let the call to `make' continue even if we
 # find a difference, since the output is clearly marked
 # as a failing test and we normally want to see the results
 # of all tests at once, including those that come after
@@ -81,30 +85,45 @@ endif
 # if, however, the flag `stop_on_error=on' was given, the
 # check command fails whenever teh output differs from the
 # precomputed file.
+#
+# as to finding which output file to compare with: we simply
+# walk the list of files created by the ./hierarchy.pl file
+# and take the first one.
 ############################################################
 
 
 %/OK : %/output
        @echo '=====Checking======' $<
-       @perl -pi $(normalize)  $<
-       @if test "x$(verbose)" = "xon" ; then \
-               cmd="diff -w $< ../compare/$(WORKDIR)/$(<:%/output=%).output" ; \
-        else \
-               cmd="diff -w $< ../compare/$(WORKDIR)/$(<:%/output=%).output > /dev/null" ; \
-        fi ; \
-        if eval $$cmd ; then \
-               echo '=====OK============' $@ ; \
-               touch $@ ; \
-        else \
+       @$(PERL) -pi $(normalize)  $<
+       @for i in $(PLATFORM-HIERARCHY) ; do \
+           testname=$(<:%/output=%) ; \
+           if test -f $$testname/cmp/$$i ; then \
+               cmpfile_found=yes ; \
                if test "x$(verbose)" = "xon" ; then \
-                       echo '+++++Error+++++++++' $@ ; \
-               else \
-                       echo '+++++Error+++++++++ $@. Use make verbose=on for the diffs' ; \
-               fi ; \
-               if test "x$(stop_on_error)" = "xon" ; then \
-                       false ; \
-               fi ; \
-        fi
+                       cmd="diff -w $< $$testname/cmp/$$i" ; \
+                else \
+                       cmd="diff -w $< $$testname/cmp/$$i > /dev/null" ; \
+                fi ; \
+                if eval $$cmd ; then \
+                       echo '=====OK============' $@ ; \
+                       touch $@ ; \
+                else \
+                       if test "x$(verbose)" = "xon" ; then \
+                               echo '+++++Error+++++++++' $@ ; \
+                       else \
+                               echo '+++++Error+++++++++ $@. Use make verbose=on for the diffs' ; \
+                       fi ; \
+                       if test "x$(stop_on_error)" = "xon" ; then \
+                               false ; \
+                       fi ; \
+                fi ; \
+                break ; \
+           fi ; \
+         done && \
+         if test "x$$cmpfile_found" != "xyes" ; then \
+               echo "*** No suitable file in $$testname/cmp found! ***" ; \
+               false ; \
+         fi
 
 
 ############################################################
@@ -188,5 +207,18 @@ Makefile.tests: $(shell echo *.cc)
 .PHONY: report show-tests clean distclean
 
 subdirs:
-       for i in $(tests) ; do mkdir $$i ; cvs add $$i ; echo "obj.* exe OK output" > $$i/.cvsignore ; cvs add $$i/.cvsignore ; done
+       for i in $(tests) ; do \
+         mkdir $$i/cmp ; \
+         cp ../results/i686-pc-linux-gnu+gcc3.2/bits/$$i.output $$i/cmp/generic ; \
+         cp ../results/i686-pc-linux-gnu+gcc3.4/bits/$$i.output $$i/cmp/i686-pc-linux-gnu+gcc3.4 ; \
+         cp ../results/i686-pc-linux-gnu+gcc4.0/bits/$$i.output $$i/cmp/i686-pc-linux-gnu+gcc4.0 ; \
+         cp ../results/i686-pc-linux-gnu+gcc4.1/bits/$$i.output $$i/cmp/i686-pc-linux-gnu+gcc4.1 ; \
+         cp ../results/i686-pc-linux-gnu+icc7.1/bits/$$i.output $$i/cmp/i686-pc-linux-gnu+icc7.1 ; \
+          cp ../results/mips-sgi-irix6.5+MIPSpro7.4/bits/$$i.output $$i/cmp/mips-sgi-irix6.5+MIPSpro7.4 ; \
+          cp ../results/x86_64-unknown-linux-gnu+gcc3.3/bits/$$i.output $$i/cmp/x86_64-unknown-linux-gnu+gcc3.3 ; \
+          cd $$i/cmp ; \
+            for j in [imx]* ; do \
+               if diff -q $$j generic ; then rm $$j ; fi ; done ; \
+          cd ../.. ; \
+       done
 

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.