Skip to content

Commit 76db5fd

Browse files
author
Nicole Thomas
committed
Merge pull request saltstack#18798 from s0undt3ch/2014.7
Make coverage reports optional
2 parents 521cb2f + e4f39ed commit 76db5fd

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

tests/jenkins.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ def build_pillar_data(options):
5757
Build a YAML formatted string to properly pass pillar data
5858
'''
5959
pillar = {'test_transport': options.test_transport,
60-
'cloud_only': options.cloud_only}
60+
'cloud_only': options.cloud_only,
61+
'with_coverage': options.test_without_coverage is False}
6162
if options.test_git_commit is not None:
6263
pillar['test_git_commit'] = options.test_git_commit
6364
if options.test_git_url is not None:
@@ -371,7 +372,8 @@ def run(opts):
371372
)
372373

373374
if opts.download_remote_reports:
374-
opts.download_coverage_report = vm_name
375+
if opts.test_without_coverage is False:
376+
opts.download_coverage_report = vm_name
375377
opts.download_unittest_reports = vm_name
376378
opts.download_packages = vm_name
377379

@@ -773,7 +775,8 @@ def run(opts):
773775
# Download unittest reports
774776
download_unittest_reports(opts)
775777
# Download coverage report
776-
download_coverage_report(opts)
778+
if opts.test_without_coverage is False:
779+
download_coverage_report(opts)
777780

778781
if opts.clean and 'JENKINS_SALTCLOUD_VM_NAME' not in os.environ:
779782
delete_vm(opts)
@@ -829,6 +832,12 @@ def parse():
829832
default='zeromq',
830833
choices=('zeromq', 'raet'),
831834
help='Set to raet to run integration tests with raet transport. Default: %default')
835+
parser.add_option(
836+
'--test-without-coverage',
837+
default=False,
838+
action='store_true',
839+
help='Do not generate coverage reports'
840+
)
832841
parser.add_option(
833842
'--prep-sls',
834843
default='git.salt',
@@ -943,9 +952,10 @@ def parse():
943952
download_unittest_reports(options)
944953
parser.exit(0)
945954

946-
if options.download_coverage_report is not None and not options.test_git_commit:
947-
download_coverage_report(options)
948-
parser.exit(0)
955+
if options.test_without_coverage is False:
956+
if options.download_coverage_report is not None and not options.test_git_commit:
957+
download_coverage_report(options)
958+
parser.exit(0)
949959

950960
if options.download_remote_logs is not None and not options.test_git_commit:
951961
download_remote_logs(options)

0 commit comments

Comments
 (0)