]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
grouping and repeat header
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 01:47:18 +0000 (01:47 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Oct 2013 01:47:18 +0000 (01:47 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31082 0785d39b-7218-0410-832d-ea1e28bc413d

tests/scripts/makereport.py

index 6cffbdd13990eeacc4d9f8b592ed06db222ca1e0..8ec75906088d6e44284b1bb76ed38dd7a0e32eae 100644 (file)
@@ -49,27 +49,39 @@ else:
     number = number[1:]
     date = datetime.strptime(dirname,"%Y%m%d-%H%M")
 
-print "Revision: %s"%number
-print "Date: %s"%(date.strftime("%Y %j  %F  %U-%w"))
-#print "Id:  %s"%name
+header = "Revision: %s"%number + "\n"
+header += "Date: %s"%(date.strftime("%Y %j  %F  %U-%w")) + '\n'
 id = subprocess.check_output(["id","-un"])+'@'+subprocess.check_output(["hostname"])
 id=id.replace('\n','')
-print "Id:  %s"%id
+header += "Id:  %s"%id
 
 #now Test.xml:
 tree = ET.parse(dirname+'/Test.xml')
 root = tree.getroot()
 testing = root.find('Testing')
 
+tests={}
+
 for test in testing.findall("Test"):
     status = test.attrib['Status']
     fail=False
     if status=="failed": fail=True
     name = test.find('Name').text
+    group = name.split('/')[0]
 
     if fail:
-        print "%s  3   %s%s"%(date,branch,name)
+        line = "%s  3   %s%s"%(date,branch,name)
     else:
-        print "%s   +  %s%s"%(date,branch,name)
+        line = "%s   +  %s%s"%(date,branch,name)
+
+    if group not in tests: tests[group]=[]
+    tests[group].append( line )
+
+for g in sorted(tests):
+    group = tests[g]
+    print header
+    for l in group:
+        print l
+
 
 

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.