22// Basis path coverage is no longer support after VectorCAST 2019SP1
33VC_Healthy_Target = [ maxStatement : 100 , maxBranch : 100 , maxFunctionCall : 100 , maxFunction : 100 , maxMCDC : 100 ,
44 minStatement : 20 , minBranch : 20 , minFunctionCall : 20 , minFunction : 20 , minMCDC : 20 ]
5-
5+
66
77VC_Use_Threshold = true
88
@@ -42,13 +42,13 @@ VC_FailurePhrases = ["No valid edition(s) available",
4242 ]
4343
4444// Unstable phrases for checkLogsForErrors
45-
4645VC_UnstablePhrases = [" Dropping probe point" ,
4746 " Value Line Error - Command Ignored" ,
4847 " INFO: Problem parsing test results file" ,
4948 " INFO: File System Error " ,
5049 " ERROR: Error accessing DataAPI" ,
51- " ERROR: Undefined Error"
50+ " ERROR: Undefined Error" . ,
51+ " Unapplied Test Data"
5252 ]
5353
5454// ===============================================================
@@ -105,13 +105,13 @@ def checkLogsForErrors(log) {
105105
106106def pluginCreateSummary (inIcon , inText ) {
107107
108- try {
109- // Protected code
108+ try {
109+ // Protected code
110110 createSummary icon : inIcon, text : inText
111111
112112 } catch (Exception e) {
113113
114- // Catch block
114+ // Catch block
115115 addSummary icon : inIcon, text : inText
116116 }
117117}
@@ -134,7 +134,7 @@ def checkBuildLogForErrors(logFile) {
134134 def output = " "
135135 def status = 0
136136
137- writeFile file : " phrases.txt" , text : VC_UnstablePhrases . join(" \n " ) + VC_FailurePhrases . join(" \n " )
137+ writeFile file : " phrases.txt" , text : VC_UnstablePhrases . join(" \n " ) + " \n " + VC_FailurePhrases . join(" \n " )
138138
139139 if (isUnix()) {
140140 cmd = " grep -f phrases.txt " + logFile + " > search_results.txt"
@@ -441,7 +441,7 @@ def setupManageProject() {
441441 _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/managewait.py --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --command_line "--project "${ VC_Manage_Project} " ${ VC_UseCILicense} --force --release-locks"
442442 _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/managewait.py --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --command_line "--project "${ VC_Manage_Project} " ${ VC_UseCILicense} --config VCAST_CUSTOM_REPORT_FORMAT=HTML"
443443 """
444-
444+
445445 if (VC_useOneCheckoutDir ) {
446446 cmds + = """ _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/managewait.py --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --command_line "--project "${ VC_Manage_Project} " ${ VC_UseCILicense} --config VCAST_DEPENDENCY_CACHE_DIR=./vcqik" """
447447 }
@@ -548,9 +548,9 @@ def transformIntoStep(inputString) {
548548 } else {
549549
550550 cmds = """
551- ${ VC_EnvSetup}
552- ${ VC_Build_Preamble} _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/managewait.py --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --command_line "--project "${ VC_Manage_Project} " ${ VC_UseCILicense} --level ${ compiler} /${ test_suite} -e ${ environment} --build-execute ${ VC_useCBT} --output ${ compiler} _${ test_suite} _${ environment} _rebuild.html"
553- ${ VC_EnvTeardown}
551+ ${ VC_EnvSetup}
552+ ${ VC_Build_Preamble} _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/managewait.py --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --command_line "--project "${ VC_Manage_Project} " ${ VC_UseCILicense} --level ${ compiler} /${ test_suite} -e ${ environment} --build-execute ${ VC_useCBT} --output ${ compiler} _${ test_suite} _${ environment} _rebuild.html"
553+ ${ VC_EnvTeardown}
554554 """
555555 }
556556
@@ -574,6 +574,7 @@ def transformIntoStep(inputString) {
574574 if (VC_usingSCM && ! VC_useOneCheckoutDir ) {
575575 def fixedJobName = fixUpName(" ${ env.JOB_NAME} " )
576576 buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/copy_build_dir.py ${ VC_Manage_Project} --level ${ compiler} /${ test_suite} --basename ${ fixedJobName} _${ compiler} _${ test_suite} _${ environment} --environment ${ environment} """ )
577+
577578 }
578579 }
579580
@@ -755,7 +756,7 @@ pipeline {
755756 runCommands(VC_postScmStepsCmds )
756757 }
757758 }
758-
759+
759760 println " Created with VectorCAST Execution Version: " + VC_createdWithVersion
760761
761762 // Run the setup step to copy over the scripts
@@ -883,22 +884,22 @@ pipeline {
883884 println ex
884885 }
885886 if (VC_sharedArtifactDirectory . length() > 0 ) {
886- def fixedJobName = fixUpName(" ${ env.JOB_NAME} " )
887+ def fixedJobName = fixUpName(" ${ env.JOB_NAME} " )
887888 buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/copy_build_dir.py ${ VC_Manage_Project} --level ${ compiler} /${ test_suite} --basename ${ fixedJobName} _${ compiler} _${ test_suite} _${ environment} --environment ${ environment} --notar""" )
888889 }
889890 }
890891
891892 if (VC_sharedArtifactDirectory . length() > 0 ) {
892893 def artifact_dir = " "
893894 try {
894- artifact_dir = VC_sharedArtifactDirectory . split(" " )[1 ]
895+ artifact_dir = VC_sharedArtifactDirectory . split(" " )[1 ]
895896 }
896897 catch (Exception ex) {
897- artifact_dir = VC_sharedArtifactDirectory . split(" =" )[1 ]
898+ artifact_dir = VC_sharedArtifactDirectory . split(" =" )[1 ]
898899 }
899900 def coverDBpath = formatPath(artifact_dir + " /vcast_data/cover.db" )
900901 def coverSfpDBpath = formatPath(artifact_dir + " /vcast_data/vcprj.db" )
901-
902+
902903 cmds = """
903904 _RM ${ coverDBpath}
904905 _RM ${ coverSfpDBpath}
@@ -930,7 +931,8 @@ pipeline {
930931 }
931932
932933 // run the metrics at the end
933- buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/generate-results.py ${ VC_Manage_Project} --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --junit --buildlog unstashed_build.log""" )
934+ buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/generate-results.py ${ VC_Manage_Project} --wait_time ${ VC_waitTime} --wait_loops ${ VC_waitLoops} --junit --buildlog unstashed_build.log --no_full_report""" )
935+ buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/parallel_full_reports.py ${ VC_Manage_Project} --jobs 8""" )
934936
935937 if (VC_useRGW3 ) {
936938 buildLogText + = runCommands(""" _VECTORCAST_DIR/vpython "${ env.WORKSPACE} "/vc_scripts/patch_rgw_directory.py ${ VC_Manage_Project} """ )
@@ -975,7 +977,7 @@ pipeline {
975977 // Send reports to the Jenkins Coverage Plugin
976978 discoverReferenceBuild()
977979 if (VC_useCoverageHistory ) {
978- recordCoverage qualityGates : [[baseline : ' PROJECT_DELTA' , criticality : ' NOTE' , metric : ' LINE' , threshold : -0.001 ], [baseline : ' PROJECT_DELTA' , criticality : ' FAILURE' , metric : ' BRANCH' , threshold : -0.001 ]], tools : [[parser : ' VECTORCAST' , pattern : ' xml_data/cobertura/coverage_results*.xml' ]]
980+ recordCoverage qualityGates : [[baseline : ' PROJECT_DELTA' , criticality : ' NOTE' , metric : ' LINE' , threshold : -0.001 ], [baseline : ' PROJECT_DELTA' , criticality : ' FAILURE' , metric : ' BRANCH' , threshold : -0.001 ]], tools : [[parser : ' VECTORCAST' , pattern : ' xml_data/cobertura/coverage_results*.xml' ]]
979981 } else {
980982 recordCoverage tools : [[parser : ' VECTORCAST' , pattern : ' xml_data/cobertura/coverage_results*.xml' ]]
981983 }
@@ -1043,8 +1045,8 @@ pipeline {
10431045 def summaryText = " "
10441046
10451047 if (fileExists(' coverage_diffs.html_tmp' )) {
1046- summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1047- summaryText + = readFile(' coverage_diffs.html_tmp' )
1048+ summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1049+ summaryText + = readFile(' coverage_diffs.html_tmp' )
10481050
10491051 } else {
10501052 print " coverage_diffs.html_tmp missing"
@@ -1055,12 +1057,12 @@ pipeline {
10551057 // If we have both of these, add them to the summary in the "normal" job view
10561058 // Blue ocean view doesn't have a summary
10571059 summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1058- summaryText + = readFile(' combined_incr_rebuild.tmp' )
1059- summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1060- summaryText + = readFile(" ${ mpName} _full_report.html_tmp" )
1061- summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1060+ summaryText + = readFile(' combined_incr_rebuild.tmp' )
1061+ summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
1062+ summaryText + = readFile(" ${ mpName} _full_report.html_tmp" )
1063+ summaryText + = " <hr style=\" height:5px;border-width:0;color:gray;background-color:gray\" > "
10621064 summaryText + = readFile(" ${ mpName} _metrics_report.html_tmp" )
1063-
1065+
10641066 pluginCreateSummary (" icon-document icon-xlg" , summaryText)
10651067
10661068 } else {
0 commit comments