report more about the failed process
This commit is contained in:
parent
41fe2189dd
commit
d790d3d325
|
@ -31,6 +31,8 @@
|
|||
# characteristic: 14.1.0 (/Applications/tahoe.app/support/lib/python2.7/site-packages)
|
||||
# pyasn1-modules: 0.0.5 (/Applications/tahoe.app/support/lib/python2.7/site-packages/pyasn1_modules-0.0.5-py2.7.egg)
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import os, re, shutil, subprocess, sys, tempfile
|
||||
|
||||
def test_osx_pkg(pkgfile):
|
||||
|
@ -68,6 +70,13 @@ def test_osx_pkg(pkgfile):
|
|||
|
||||
rc = callit.wait()
|
||||
if rc != 0:
|
||||
print(
|
||||
"{} failed.\n"
|
||||
"stdout: {}\n"
|
||||
"stderr: {}\n".format(
|
||||
cmd, callit.stdout.read(), callit.stderr.read(),
|
||||
),
|
||||
)
|
||||
raise Exception("FAIL: '%s' returned non-zero exit code: %r" % (" ".join(cmd), rc))
|
||||
stdouttxt = callit.stdout.read()
|
||||
|
||||
|
@ -86,8 +95,8 @@ def test_osx_pkg(pkgfile):
|
|||
if __name__ == '__main__':
|
||||
pkgs = [fn for fn in os.listdir(".") if fn.endswith("-osx.pkg")]
|
||||
if len(pkgs) != 1:
|
||||
print "ERR: unable to find a single .pkg file:", pkgs
|
||||
print("ERR: unable to find a single .pkg file:", pkgs)
|
||||
sys.exit(1)
|
||||
print "Testing %s ..." % pkgs[0]
|
||||
print("Testing %s ..." % pkgs[0])
|
||||
test_osx_pkg(pkgs[0])
|
||||
print "Looks OK!"
|
||||
print("Looks OK!")
|
||||
|
|
Loading…
Reference in New Issue