@@ -82,7 +82,32 @@ def __init__(self, cover_report_name, verbose, use_ci):
8282 self .use_ci = " --ci "
8383 else :
8484 self .use_ci = ""
85+ self .system_tests_status_report_generated = False
8586
87+ def generate_system_test_status_report (self ):
88+ if self .system_tests_status_report_generated :
89+ return
90+
91+ report_name = os .path .basename (self .FullManageProjectName )[:- 4 ] + "_system_tests_status.html"
92+
93+ print (" Creating System Test Status " + self .FullManageProjectName )
94+ callStr = os .environ .get ('VECTORCAST_DIR' ) + os .sep + "manage -p " + self .FullManageProjectName + " --system-tests-status=" + report_name
95+
96+ import subprocess
97+
98+ print (callStr )
99+ p = subprocess .Popen (callStr , shell = True , stdout = subprocess .PIPE , stderr = subprocess .PIPE , universal_newlines = True )
100+ out , err = p .communicate ()
101+
102+ if os .path .exists (report_name ):
103+ print ("File exists: " + report_name )
104+ else :
105+ print ("File not exists: " + report_name )
106+
107+ if err :
108+ print ("Cannot create system test status report{} {}" .format (out , err ))
109+
110+ self .system_tests_status_report_generated = True
86111#
87112# BaseGenerateXml - calculate coverage value
88113#
@@ -542,7 +567,8 @@ def __init__(self, FullManageProjectName, build_dir, env, compiler, testsuite, c
542567 self .cbtDict = None
543568
544569 if os .path .exists (cov_path ) and os .path .exists (cov_path [:- 4 ]):
545- self .using_cover = True
570+ self .using_cover = True
571+ self .generate_system_test_status_report ()
546572 try :
547573 self .api = CoverApi (cov_path )
548574 except :
@@ -621,18 +647,16 @@ def generate_unit(self):
621647 if self .verbose :
622648 print (level , st .name , pass_fail_rerun )
623649 self .write_testcase (st , level , st .name )
624- from generate_qa_results_xml import saveQATestStatus
625- saveQATestStatus (self .FullManageProjectName )
626-
627650 api .close ()
628651
629652 except ImportError as e :
630- from generate_qa_results_xml import genQATestResults
631- pc ,fc = genQATestResults (self .FullManageProjectName , self .compiler + "/" + self .testsuite , self .env , True , self .encFmt )
632- self .failed_count += fc
633- self .passed_count += pc
634- return
653+ pass
635654
655+ from generate_qa_results_xml import genQATestResults
656+ pc ,fc = genQATestResults (self .FullManageProjectName , self .compiler + "/" + self .testsuite , self .env , True , self .encFmt )
657+ self .failed_count += fc
658+ self .passed_count += pc
659+
636660 else :
637661
638662 try :
0 commit comments