diff options
Diffstat (limited to 'crosperf/crosperf.py')
-rwxr-xr-x | crosperf/crosperf.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/crosperf/crosperf.py b/crosperf/crosperf.py index ec07e7c7..f195b13a 100755 --- a/crosperf/crosperf.py +++ b/crosperf/crosperf.py @@ -27,6 +27,9 @@ from cros_utils import logger import test_flag +HAS_FAILURE = 1 +ALL_FAILED = 2 + def SetupParserOptions(parser): """Add all options to the parser.""" @@ -128,7 +131,11 @@ def RunCrosperf(argv): runner = ExperimentRunner( experiment, json_report, using_schedv2=(not options.noschedv2)) - runner.Run() + ret = runner.Run() + if ret == HAS_FAILURE: + raise RuntimeError('One or more benchmarks failed.') + if ret == ALL_FAILED: + raise RuntimeError('All benchmarks failed to run.') def Main(argv): |