[SCM] Gerris Flow Solver branch, upstream, updated. b3aa46814a06c9cb2912790b23916ffb44f1f203

Stephane Popinet s.popinet at niwa.co.nz
Fri May 15 02:52:00 UTC 2009


The following commit has been merged in the upstream branch:
commit 3b8c0560ca402a9fc1f5d76af133b7e04902a71b
Author: Stephane Popinet <s.popinet at niwa.co.nz>
Date:   Wed Jun 15 14:19:05 2005 +1000

    Automated generation of summary for test docs
    
    darcs-hash:20050615041905-fbd8f-b0f38b0b8fa79a21876ed17f96b3cd18bef90779.gz

diff --git a/test/euler/Makefile.am b/test/euler/Makefile.am
index c3d08d3..ee0d5f6 100644
--- a/test/euler/Makefile.am
+++ b/test/euler/Makefile.am
@@ -41,7 +41,7 @@ tests.pdf: tests.dvi
 tests.tex: template.tex Makefile.deps
 	rm -r -f tests
 	python gfs2tex $(TESTDIRS)
-	sed "s/GFS_VERSION/`$(top_srcdir)/src/gerris2D -V 2>&1 | awk '{ if ($$5 == "version") print $$6}'`/g" < template.tex > tests.tex
+	cp -f template.tex tests.tex
 
 Makefile.deps: Makefile.am depend.py
 	python depend.py $(TESTDIRS) > Makefile.deps
diff --git a/test/euler/reynolds/reynolds.sh b/test/euler/reynolds/reynolds.sh
index d071531..4a6819b 100644
--- a/test/euler/reynolds/reynolds.sh
+++ b/test/euler/reynolds/reynolds.sh
@@ -1,7 +1,7 @@
 rm -f reynolds
 
 for level in 5 6 7; do
-  if sed "s/LEVEL/$level/g" < $1 | $gerris2D - | awk -v m=$2 -v level=$level '{
+  if sed "s/LEVEL/$level/g" < $1 | gerris2D - | awk -v m=$2 -v level=$level '{
     time = $3
     ke = $5
     if (time == 0)
diff --git a/test/euler/test.py b/test/euler/test.py
index 13f9661..e1a26d0 100644
--- a/test/euler/test.py
+++ b/test/euler/test.py
@@ -1,13 +1,16 @@
 import sys
+import commands
 import os
 import os.path
 sys.path.append("../../doc/examples")
 import gfs2tex
+from datetime import *
 
-env = ""
-for p in ["gerris2D","gerris3D","gerris2D3"]:
-    env += p + "=" + os.getcwd() + "/../../src/" + p + " "
-env += " PYTHONPATH=$PYTHONPATH:" + os.getcwd() + " "
+env = "PYTHONPATH=$PYTHONPATH:" + os.getcwd()
+system = commands.getoutput('uname -o -n -m')
+path = commands.getoutput('which gerris2D')
+version = commands.getoutput("""gerris2D -V 2>&1 | awk '{if ($5 == "version") print $6;}'""")
+start = datetime.now()
 
 n = 0
 failed = 0
@@ -26,6 +29,30 @@ for start in sys.argv[1:]:
                 print "PASS:",root
                 print >>open(test.path + "/status",'w'), "{\color{green}PASS}:"
             n += 1
+
+end = datetime.now()
+e = end - start
+s = e.seconds
+h = int(s/3600)
+s -= h*3600
+m = int(s/60)
+s -= m*60
+
+summary = open('summary.tex','w')
+print >>summary, r'\begin{tabular}{ll}'
+print >>summary, r'{\bf Version} &', version, r'\\'
+print >>summary, r'{\bf Path} &', path, r'\\'
+print >>summary, r'{\bf System} &', system, r'\\'
+print >>summary, r'{\bf Start} &', start.strftime('%a %d %b %H:%M:%S'), r'\\'
+print >>summary, r'{\bf Finish} &', end.strftime('%a %d %b %H:%M:%S'), r'\\'
+print >>summary, r'{\bf Elapsed} &', repr(e.days) + ":" + repr(h) + ":" + repr(m) + ":" + repr(s), r'\\'
+print >>summary, r'{\bf Status} &',
+if failed:
+    print >>summary, r'{\color{red}FAIL}'
+else:
+    print >>summary, r'{\color{green}PASS}'
+print >>summary, r'\end{tabular}'
+
 if failed:
     msg = repr(failed) + " of " + repr(n) + " tests failed"
 else:

-- 
Gerris Flow Solver



More information about the debian-science-commits mailing list