diff options
author | jose.lausuch <jose.lausuch@ericsson.com> | 2016-05-09 15:08:41 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2016-05-10 14:13:43 +0200 |
commit | 2d8974d6cebaa1428ab1a175ceb9a0432a84e615 (patch) | |
tree | e3b0c5d5108db3f824ef2aa5222a3e6ce06c0297 /ci/run_tests.py | |
parent | acd3d80504a56183a4909dce52b56bc7e15bc6cd (diff) |
Adapt tiers to run depending on WEEKLY/DAILY
JIRA: FUNCTEST-244
Change-Id: I11bf28baff52b75b0f6c58845edc22f266dfcbe8
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'ci/run_tests.py')
-rw-r--r-- | ci/run_tests.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py index f30e7b96..5dba1819 100644 --- a/ci/run_tests.py +++ b/ci/run_tests.py @@ -10,6 +10,7 @@ import argparse import os +import re import sys import functest.ci.tier_builder as tb @@ -101,15 +102,25 @@ def run_tier(tier): def run_all(tiers): summary = "" + BUILD_TAG = os.getenv('BUILD_TAG') + if BUILD_TAG is not None and re.search("daily", BUILD_TAG) is not None: + CI_LOOP = "daily" + else: + CI_LOOP = "weekly" + + tiers_to_run = [] + for tier in tiers.get_tiers(): - summary += ("\n - %s. %s:\n\t %s" - % (tier.get_order(), - tier.get_name(), - tier.get_test_names())) + if re.search(CI_LOOP, tier.get_ci_loop()) is not None: + tiers_to_run.append(tier) + summary += ("\n - %s. %s:\n\t %s" + % (tier.get_order(), + tier.get_name(), + tier.get_test_names())) logger.info("Tiers to be executed:%s" % summary) - for tier in tiers.get_tiers(): + for tier in tiers_to_run: run_tier(tier) |