Skip to content

Commit 11e1cd9

Browse files
committed
integrating Jenkkins changes
1 parent cb70c54 commit 11e1cd9

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

cobertura.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import sys, os
3737
from collections import defaultdict
3838
from pprint import pprint
39+
import argparse
3940

4041
fileList = []
4142

@@ -751,19 +752,17 @@ def generateCoverageResults(inFile, azure = False, xml_data_dir = "xml_data", ve
751752
print("Cannot create Cobertura metrics. Please upgrade VectorCAST")
752753
sys.exit()
753754

754-
extended = False
755-
azure = False
756-
757-
inFile = sys.argv[1]
758-
try:
759-
if "--azure" == sys.argv[2]:
760-
azure = True
761-
print ("using azure mode")
762-
elif "--extended" == sys.argv[2]:
763-
extended = True
764-
except Exception as e:
765-
azure = False
766-
extended = False
755+
parser = argparse.ArgumentParser()
756+
parser.add_argument('ManageProject', help='Manager Project Name')
757+
parser.add_argument('-e', '--extended', help='Enabled extended Cobertura format', action="store_true", default=False)
758+
parser.add_argument('-a', '--azure', help='Generate results to target Azure', action="store_true", default=False)
759+
parser.add_argument('--xml_data_dir', help='Set the base directory of the xml_data directory. Default is the workspace directory', default = 'xml_data')
760+
args = parser.parse_args()
761+
extended = args.extended
762+
azure = args.azure
763+
764+
inFile = args.ManageProject
765+
xml_data_dir = args.xml_data_dir
767766

768767
generateCoverageResults(inFile, azure, xml_data_dir = "xml_data", verbose = False, extended = extended)
769768

extract_build_dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# The MIT License
33
#
4-
# Copyright 2016 Vector Software, East Greenwich, Rhode Island USA
4+
# Copyright 2024 Vector Informatik, GmbH.
55
#
66
# Permission is hereby granted, free of charge, to any person obtaining a copy
77
# of this software and associated documentation files (the "Software"), to deal

prevcast_parallel_build_execute.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ def parseParallelExecuteArgs(self):
133133
self.system_test_lock = Lock()
134134
self.mpName = self.manageProject.replace(".vcm","")
135135
self.mpName = os.path.basename(self.mpName)
136-
137136

138137
def th_Print (self, str):
139138
self.lock.acquire()

vcast_exec.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,11 @@ def runExec(self):
383383
else:
384384
output = ""
385385

386-
387386
if checkVectorCASTVersion(25, False):
388387
useParallelManageCommand = True
389388
else:
390389
useParallelManageCommand = False
391390

392-
393391
if self.jobs != "1" and checkVectorCASTVersion(20, True) and not useParallelManageCommand:
394392
# setup project for parallel execution
395393
self.manageWait.exec_manage_command ("--config VCAST_DEPENDENCY_CACHE_DIR=./vcqik")
@@ -418,7 +416,6 @@ def runExec(self):
418416
jstr = "--jobs="+str(self.jobs)
419417
else:
420418
jstr = ""
421-
422419
cmd = "--" + self.build_execute + " " + self.useCBT + self.level_option + self.env_option + " " + jstr + " " + output
423420
build_log = self.manageWait.exec_manage_command (cmd)
424421
open(self.build_log_name,"w").write(build_log)
@@ -517,9 +514,7 @@ def runExec(self):
517514

518515
if args.export_rgw:
519516
vcExec.exportRgw()
520-
521517
if vcExec.useJunitFailCountPct:
522518
print("--exit_with_failed_count=" + args.exit_with_failed_count + " specified. Fail Percent = " + str(round(vcExec.failed_pct,0)) + "% Return code: ", str(vcExec.failed_count))
523519
sys.exit(vcExec.failed_count)
524520

525-

0 commit comments

Comments
 (0)