From 021aea47f12af7daf9349c043e2240cea265d83e Mon Sep 17 00:00:00 2001 From: heister Date: Thu, 3 Oct 2013 01:36:20 +0000 Subject: [PATCH] optional argument for makereport.py: branch name git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31080 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/scripts/makereport.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tests/scripts/makereport.py b/tests/scripts/makereport.py index 1d6dc4c49e..0f5ac3d987 100644 --- a/tests/scripts/makereport.py +++ b/tests/scripts/makereport.py @@ -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) -- 2.39.5