Bug 743026: Make the --verbose flag to runxpcshelltests.py also show the command, environment, and cwd. r=ted

This commit is contained in:
Jim Blandy 2012-04-16 14:19:07 -07:00
parent 934b017548
commit 1d06a9085f

View File

@ -656,11 +656,21 @@ class XPCShellTests(object):
if 'debug' in test:
args.insert(0, '-d')
completeCmd = cmdH + cmdT + args
try:
self.log.info("TEST-INFO | %s | running test ..." % name)
if verbose:
self.log.info("TEST-INFO | %s | full command: %r" % (name, completeCmd))
self.log.info("TEST-INFO | %s | current directory: %r" % (name, testdir))
# Show only those environment variables that are changed from
# the ambient environment.
changedEnv = (set("%s=%s" % i for i in self.env.iteritems())
- set("%s=%s" % i for i in os.environ.iteritems()))
self.log.info("TEST-INFO | %s | environment: %s" % (name, list(changedEnv)))
startTime = time.time()
proc = self.launchProcess(cmdH + cmdT + args,
proc = self.launchProcess(completeCmd,
stdout=pStdout, stderr=pStderr, env=self.env, cwd=testdir)
# Allow user to kill hung subprocess with SIGINT w/o killing this script