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.py23
1 files changed, 20 insertions, 3 deletions
diff --git a/ci/run_tests.py b/ci/run_tests.py
index 3b3ed2c47..106214400 100644
--- a/ci/run_tests.py
+++ b/ci/run_tests.py
@@ -10,6 +10,7 @@
import argparse
import os
+import subprocess
import sys
import functest.ci.tier_builder as tb
@@ -80,14 +81,26 @@ def run_test(test):
flags += " -r"
cmd = ("%s%s" % (EXEC_SCRIPT, flags))
- logger.debug("Executing command %s" % cmd)
-
+ logger.debug("Executing command '%s'" % cmd)
print_separator("")
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+
+ while p.poll() is None:
+ line = p.stdout.readline().rstrip()
+ logger.debug(line)
+
+ if p != 0:
+ logger.error("The command '%s' failed. Cleaning and exiting." % cmd)
+ if CLEAN_FLAG:
+ cleanup()
+ sys.exit(1)
+
if CLEAN_FLAG:
cleanup()
+
def run_tier(tier):
print_separator("#")
logger.info("Running tier '%s'" % tier.get_name())
@@ -98,7 +111,11 @@ def run_tier(tier):
def run_all(tiers):
- logger.debug("Tiers to be executed:\n\n%s" % tiers)
+ logger.debug("Tiers to be executed:")
+ for tier in tiers.get_tiers():
+ logger.info("\n - %s. %s:\n\t%s"
+ % (tier.get_order(), tier.get_name(), tier.get_tests()))
+
for tier in tiers.get_tiers():
run_tier(tier)