Skip to content

Commit eec4592

Browse files
committed
Updates to hide missing tar command
Update to fix directory of system test results
1 parent d73c623 commit eec4592

File tree

3 files changed

+56
-11
lines changed

3 files changed

+56
-11
lines changed

src/main/resources/scripts/baseJenkinsfile.groovy

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
// ===========================================================
2+
//
3+
// Auto-generated script by VectorCAST Execution Plug-in
4+
// based on the information provided when creating the
5+
//
6+
// VectorCAST > Pipeline job
7+
//
8+
// ===========================================================
9+
10+
VC_Manage_Project = 'CurrentRelease/vcast-workarea/vc_manage/PointOfSales_Manage.vcm'
11+
VC_EnvSetup = '''call %WORKSPACE%/setenv.bat
12+
'''
13+
VC_Build_Preamble = ""
14+
VC_EnvTeardown = ''''''
15+
def scmStep () { git 'https://github.com/TimSVector/PointOfSales_v2.git' }
16+
VC_usingSCM = true
17+
VC_postScmStepsCmds = ''''''
18+
VC_sharedArtifactDirectory = ''''''
19+
VC_Agent_Label = 'Host_Test_Node'
20+
VC_waitTime = '30'
21+
VC_waitLoops = '1'
22+
VC_maxParallel = 0
23+
VC_useOneCheckoutDir = false
24+
VC_UseCILicense = ""
25+
VC_useCBT = "--incremental"
26+
VC_useCoveragePlugin = true
27+
VC_createdWithVersion = '0.78-SNAPSHOT (private-22152ed7-vaprti)'
28+
VC_usePCLintPlus = false
29+
VC_pclpCommand = ''
30+
VC_pclpResultsPattern = '**/*lint_results.txt'
31+
VC_useSquore = false
32+
VC_squoreCommand = ''''''
33+
VC_useTESTinsights = false
34+
VC_TESTinsights_URL = ''
35+
VC_TESTinsights_Project = "${JOB_BASE_NAME}"
36+
VC_TESTinsights_Proxy = ''
37+
VC_TESTinsights_Credential_ID = ''
38+
VC_TESTinsightsScmUrl = ''
39+
VC_TESTinsights_SCM_Tech = 'git'
40+
VC_TESTinsights_Revision = ""
41+
VC_useCoverageHistory = false
42+
VC_useStrictImport = true
43+
VC_useRGW3 = false
44+
VC_useImportedResults = false
45+
VC_useLocalImportedResults = false
46+
VC_useExternalImportedResults = false
47+
VC_externalResultsFilename = ""
48+
149
// Code Coverage threshold numbers
250
// Basis path coverage is no longer support after VectorCAST 2019SP1
351
VC_Healthy_Target = [ maxStatement: 100, maxBranch: 100, maxFunctionCall: 100, maxFunction: 100, maxMCDC: 100,
@@ -757,9 +805,11 @@ pipeline {
757805
}
758806
}
759807

760-
// archive existing reports
761-
catchError(buildResult: 'SUCCESS', stageResult: 'SUCCESS') {
808+
// archive existing reports
809+
try {
762810
tar file: "reports_archive.tar" , glob: "management/*.html,xml_data/**/*.xml", overwrite: true
811+
} catch {
812+
println "tar unavailable"
763813
}
764814

765815
println "Created with VectorCAST Execution Version: " + VC_createdWithVersion

src/main/resources/scripts/generate_qa_results_xml.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def writeJunitFooter(junitfile):
3737

3838
def write_tc_data(currentEnv, unit_report_name, jobNameDotted, passed, failed, error, testcase_data, encoding = 'utf-8', xml_data_dir = "xml_data"):
3939

40-
fh = open(os.path.join(xml_data_dir,"junit",unit_report_name), "w")
40+
fh = open(os.path.join(xml_data_dir,unit_report_name), "w")
4141

4242
writeJunitHeader(currentEnv, fh, failed, failed+passed, unit_report_name, encoding)
4343
writeJunitData(fh, testcase_data)

src/main/resources/scripts/generate_xml.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ def __init__(self, FullManageProjectName, verbose, teePrint, use_cte):
9696
self.testsuite = ""
9797
self.env = ""
9898
self.build_dir = ""
99-
100-
self.fh_data = ""
10199

102100
if self.teePrint is None:
103101
self.teePrint = tee_print.TeePrint()
@@ -1057,8 +1055,6 @@ def __init__(self, FullManageProjectName, build_dir, env, compiler, testsuite, c
10571055
self.api.commit = dummy
10581056
self.failed_count = 0
10591057
self.passed_count = 0
1060-
1061-
10621058

10631059
#
10641060
# GenerateXml - add any compound tests to the unit report
@@ -1232,7 +1228,6 @@ def start_unit_test_file(self):
12321228
else:
12331229
success += 1
12341230
self.passed_count += 1
1235-
12361231
self.fh_data = ""
12371232
self.fh_data += ("<?xml version=\"1.0\" encoding=\"" + self.encFmt.upper() + "\"?>\n")
12381233
self.fh_data += ("<testsuites>\n")
@@ -1380,11 +1375,10 @@ def write_testcase(self, tc, unit_name, func_name, st_is_monitored = False, unit
13801375
testsuite = escape(self.testsuite, quote=False).replace(".","")
13811376
envName = escape(self.env, quote=False).replace(".","")
13821377

1383-
tc_name_full = unit_name + "." + func_name + "." + tc_name
1384-
13851378
classname = compiler + "." + testsuite + "." + envName
13861379

13871380
if isSystemTest:
1381+
tc_name_full = classname + "." + tc_name
13881382
exp_total = tc.total
13891383
exp_pass = tc.passed
13901384
result = " System Test Build Status: " + tc.build_status + ". \n System Test: " + tc.name + " \n Execution Status: "
@@ -1401,6 +1395,7 @@ def write_testcase(self, tc, unit_name, func_name, st_is_monitored = False, unit
14011395
tc.passed = 0
14021396

14031397
else:
1398+
tc_name_full = unit_name + "." + func_name + "." + tc_name
14041399
summary = tc.history.summary
14051400
exp_total = summary.expected_total
14061401
exp_pass = exp_total - summary.expected_fail
@@ -1447,7 +1442,7 @@ def write_testcase(self, tc, unit_name, func_name, st_is_monitored = False, unit
14471442

14481443
testcaseString, testcaseStringExtraStatus = self.get_xml_string(fpath)
14491444

1450-
if self.use_cte:
1445+
if self.use_cte or unitName == "":
14511446
unitName = classname
14521447

14531448
if status != "":

0 commit comments

Comments
 (0)