From 9d101f85e36f2857472284386aea5657d7aba953 Mon Sep 17 00:00:00 2001 From: Rintaro Kuroiwa Date: Tue, 18 Apr 2017 16:33:35 -0700 Subject: [PATCH] Print the failing command if subprocess.call() fails Change-Id: Ib640b590e259a1a9bd44030ae13611cd359721e0 --- packager/app/test/packager_app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packager/app/test/packager_app.py b/packager/app/test/packager_app.py index 58381fc2aa..6f8b9ef4ad 100644 --- a/packager/app/test/packager_app.py +++ b/packager/app/test/packager_app.py @@ -45,7 +45,8 @@ class PackagerApp(object): # Put single-quotes around each entry so that things like '$' signs in # segment templates won't be interpreted as shell variables. self.packaging_command_line = ' '.join(["'%s'" % entry for entry in cmd]) - assert 0 == subprocess.call(cmd) + assert 0 == subprocess.call(cmd), ('%s returned non-0 status' % + self.packaging_command_line) def GetCommandLine(self): return self.packaging_command_line