Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: scripts/slave/unittests/recipe_simulation_test.py

Issue 1864933002: Add an actionable error message when recipe_simulation_test.py fails (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/unittests/recipe_simulation_test.py
diff --git a/scripts/slave/unittests/recipe_simulation_test.py b/scripts/slave/unittests/recipe_simulation_test.py
index 5e5b9315f5383fcd893b45a85317d8933bd70e25..81dd7284ecfc6e1585d0e4bb35801b74516daeba 100755
--- a/scripts/slave/unittests/recipe_simulation_test.py
+++ b/scripts/slave/unittests/recipe_simulation_test.py
@@ -4,7 +4,9 @@
# found in the LICENSE file.
import os
+import pipes
import shutil
+import subprocess
import sys
import test_env # pylint: disable=W0403,W0611
@@ -21,5 +23,18 @@ RECIPES_PY = os.path.join(
os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
'recipes.py')
-args = [sys.argv[0], 'simulation_test'] + sys.argv[1:]
-os.execvp(RECIPES_PY, args)
+args = [RECIPES_PY, 'simulation_test'] + sys.argv[1:]
+ret = subprocess.call(args)
+if ret:
+ # TODO(martiniss): Move this logic into recipes-py. http://crbug.com/601662
+ if not any(x.startswith('train') for x in args):
+ print
+ print 'To train new expectations, run:'
+ print ' ', sys.argv[0], 'train'
+ print
+ if not any(x.startswith('--html_report') for x in args):
+ print 'To create a coverage report, run:'
+ print ' ', ' '.join(pipes.quote(arg) for arg in sys.argv),
+ print '--html_report PATH'
+ print
+sys.exit(ret)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698