From 7bb7eda6d5a2ae93c4c43a26af2cfe564db4dd60 Mon Sep 17 00:00:00 2001 From: mefarazath Date: Sat, 11 May 2019 15:09:09 +0530 Subject: [PATCH] Add step to build repo without tests once before we start running integration tests --- integration-tests/run-intg-test.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/integration-tests/run-intg-test.py b/integration-tests/run-intg-test.py index 4a3c4f2..4ee94f1 100644 --- a/integration-tests/run-intg-test.py +++ b/integration-tests/run-intg-test.py @@ -210,6 +210,16 @@ def configure_product(): logger.error("Error occurred while configuring the product", exc_info=True) +def build_source_without_tests(source_path): + """Build the product-source. + """ + logger.info('Building the source skipping tests') + if sys.platform.startswith('win'): + subprocess.call(['mvn', 'clean', 'install', '-B', '-e','-Dmaven.test.skip=true'], shell=True, cwd=source_path) + else: + subprocess.call(['mvn', 'clean', 'install', '-B', '-e', '-Dmaven.test.skip=true'], cwd=source_path) + logger.info('Module build is completed. Module: ' + str(source_path)) + def main(): try: global logger @@ -238,9 +248,10 @@ def main(): if cm.test_mode == "RELEASE": cm.checkout_to_tag() - # product name retrieve from product pom files dist_name = cm.get_dist_name(pom_path) + # build the product without test once to make samples and required artifacts to be available. + build_source_without_tests(cm.workspace + "/" + cm.product_id + "/") cm.get_latest_released_dist() elif cm.test_mode == "SNAPSHOT": # product name retrieve from product pom files