aboutsummaryrefslogtreecommitdiffstats
path: root/xtesting/ci/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'xtesting/ci/run_tests.py')
-rw-r--r--xtesting/ci/run_tests.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/xtesting/ci/run_tests.py b/xtesting/ci/run_tests.py
index c8e99663..7379f092 100644
--- a/xtesting/ci/run_tests.py
+++ b/xtesting/ci/run_tests.py
@@ -66,6 +66,9 @@ class RunTestsParser(object):
self.parser.add_argument("-r", "--report", help="Push results to "
"database (default=false).",
action="store_true")
+ self.parser.add_argument("-p", "--push", help="Push artifacts to "
+ "S3 repository (default=false).",
+ action="store_true")
def parse_args(self, argv=None):
"""Parse arguments.
@@ -86,6 +89,7 @@ class Runner(object):
self.overall_result = Result.EX_OK
self.clean_flag = True
self.report_flag = False
+ self.push_flag = False
self.tiers = tier_builder.TierBuilder(
pkg_resources.resource_filename('xtesting', 'ci/testcases.yaml'))
@@ -175,6 +179,8 @@ class Runner(object):
LOGGER.info("Test result:\n\n%s\n", test_case)
if self.clean_flag:
test_case.clean()
+ if self.push_flag:
+ test_case.publish_artifacts()
except ImportError:
LOGGER.exception("Cannot import module %s", run_dict['module'])
except AttributeError:
@@ -227,12 +233,14 @@ class Runner(object):
for tier in tiers_to_run:
self.run_tier(tier)
- def main(self, **kwargs):
+ def main(self, **kwargs): # pylint: disable=too-many-branches
"""Entry point of class Runner"""
if 'noclean' in kwargs:
self.clean_flag = not kwargs['noclean']
if 'report' in kwargs:
self.report_flag = kwargs['report']
+ if 'push' in kwargs:
+ self.push_flag = kwargs['push']
try:
LOGGER.info("Deployment description:\n\n%s\n", env.string())
self.source_envfile()