summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dovetail/cli/commands/cli_testcase.py2
-rwxr-xr-xdovetail/run.py6
2 files changed, 7 insertions, 1 deletions
diff --git a/dovetail/cli/commands/cli_testcase.py b/dovetail/cli/commands/cli_testcase.py
index 7529765f..d4d80334 100644
--- a/dovetail/cli/commands/cli_testcase.py
+++ b/dovetail/cli/commands/cli_testcase.py
@@ -84,5 +84,5 @@ class CliTestcase(object):
cmd = ("python %s/run.py"
" %s" % (repo_dir, options))
- dt_utils.exec_cmd(cmd, exit_on_error=False,
+ dt_utils.exec_cmd(cmd, exit_on_error=True,
exec_msg_on=False, info=True)
diff --git a/dovetail/run.py b/dovetail/run.py
index 19d0acb6..348c3915 100755
--- a/dovetail/run.py
+++ b/dovetail/run.py
@@ -33,6 +33,9 @@ import utils.dovetail_logger as dt_logger
import utils.dovetail_utils as dt_utils
+EXIT_RUN_FAILED = 2
+
+
def load_testsuite(testsuite):
Testsuite.load()
return Testsuite.get(testsuite)
@@ -285,6 +288,9 @@ def main(*args, **kwargs):
dt_utils.get_hardware_info(logger)
testcase_list = get_testcase_list(logger, **kwargs)
+ if not testcase_list:
+ raise SystemExit(EXIT_RUN_FAILED)
+
duration = run_test(testcase_list, logger)
if (duration != "stop_on_fail"):
Report.generate(testcase_list, duration)