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

Unified Diff: recipe_engine/unittests/run_test.py

Issue 2798053003: introduce recipe_exception in result.proto (Closed)
Patch Set: Created 3 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 | « recipe_engine/step_runner.py ('k') | recipes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_engine/unittests/run_test.py
diff --git a/recipe_engine/unittests/run_test.py b/recipe_engine/unittests/run_test.py
index 5e59495253504d49df0dec555bd55c3ab893d704..0ccc8bd53e48ec745a77d00704c2e592da85ed33 100755
--- a/recipe_engine/unittests/run_test.py
+++ b/recipe_engine/unittests/run_test.py
@@ -45,9 +45,11 @@ class RunTest(unittest.TestCase):
def _test_recipe(self, recipe, properties=None):
proc = subprocess.Popen(
self._run_cmd(recipe, properties), stdout=subprocess.PIPE)
- proc.communicate()
- self.assertEqual(0, proc.returncode, '%d != %d when testing %s' % (
- 0, proc.returncode, recipe))
+ stdout, stderr = proc.communicate()
+ self.assertEqual(
+ 0, proc.returncode,
+ ('%d != %d when testing %s\nstdout: %s\nstderr: %s' % (
+ 0, proc.returncode, recipe, stdout, stderr)))
def test_examples(self):
tests = [
@@ -74,7 +76,6 @@ class RunTest(unittest.TestCase):
# If this takes longer than 5 seconds to run, we consider it failed.
self.assertLess(after - now, 5)
-
def test_nonexistent_command(self):
subp = subprocess.Popen(
self._run_cmd('engine_tests/nonexistent_command'),
« no previous file with comments | « recipe_engine/step_runner.py ('k') | recipes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698