aboutsummaryrefslogtreecommitdiffstats
path: root/ci/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'ci/run_tests.py')
-rw-r--r--ci/run_tests.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index f30e7b961..5dba18190 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)