]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
optional argument for makereport.py: branch name
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 01:36:20 +0000 (01:36 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 01:36:20 +0000 (01:36 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31080 0785d39b-7218-0410-832d-ea1e28bc413d

tests/scripts/makereport.py

index 1d6dc4c49e4a7145e542417c76a022c7f2615717..0f5ac3d9872ee44151505c077968bf4ec71bdc3e 100644 (file)
@@ -20,14 +20,17 @@ class Revision:
         self.n_tests = 0
         self.n_fail = 0
 
+branch=''
+args=sys.argv
+args.pop(0)
 
-
-if len(sys.argv)==2:
-    dirname=sys.argv[1].replace('/','')
-else:
-    n=glob.glob("*/Build.xml")
-    n.sort(reverse=True)
-    dirname = n[0].replace('/Build.xml','')
+dirname=""
+while len(args)>0:
+    if args[0].startswith("20"): #I hope this script is not used in the year 2100
+        dirname=args[0].replace('/','')
+    else:
+        branch=args[0].replace('/','')+'/'
+    args.pop(0)
 
 if len(glob.glob(dirname+'/Update.xml'))>0:
     #new format
@@ -62,8 +65,8 @@ for test in testing.findall("Test"):
     name = test.find('Name').text
 
     if fail:
-        print "%s  3   %s"%(date,name)
+        print "%s  3   %s%s"%(date,branch,name)
     else:
-        print "%s   +  %s"%(date,name)
+        print "%s   +  %s%s"%(date,branch,name)
 
 

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.