mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 01:05:45 +00:00
Bug 484604 - OS/2 problem with running the new python test program; r=ted.mielczarek
This commit is contained in:
parent
c5db2caabd
commit
bc69b8d01f
@ -125,6 +125,9 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
||||
xrePath = os.path.abspath(xrePath)
|
||||
if sys.platform == 'win32':
|
||||
env["PATH"] = env["PATH"] + ";" + xrePath
|
||||
elif sys.platform in ('os2emx', 'os2knix'):
|
||||
os.environ["BEGINLIBPATH"] = xrePath + ";" + env["BEGINLIBPATH"]
|
||||
os.environ["LIBPATHSTRICT"] = "T"
|
||||
elif sys.platform == 'osx':
|
||||
env["DYLD_LIBRARY_PATH"] = xrePath
|
||||
else: # unix or linux?
|
||||
@ -189,7 +192,10 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
||||
|
||||
# Now execute each test individually.
|
||||
for test in testfiles:
|
||||
pstdout = PIPE
|
||||
if sys.platform == 'os2emx':
|
||||
pstdout = None
|
||||
else:
|
||||
pstdout = PIPE
|
||||
pstderr = STDOUT
|
||||
interactiveargs = []
|
||||
if interactive:
|
||||
@ -208,7 +214,7 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
||||
# not sure what else to do here...
|
||||
return True
|
||||
|
||||
if proc.returncode != 0 or stdout.find("*** PASS") == -1:
|
||||
if proc.returncode != 0 or (stdout is not None and stdout.find("*** PASS") == -1):
|
||||
print """TEST-UNEXPECTED-FAIL | %s | test failed (with xpcshell return code: %d), see following log:
|
||||
>>>>>>>
|
||||
%s
|
||||
@ -220,14 +226,15 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
||||
|
||||
leakReport = processLeakLog(leakLogFile)
|
||||
|
||||
try:
|
||||
f = open(test + '.log', 'w')
|
||||
f.write(stdout)
|
||||
if leakReport:
|
||||
f.write(leakReport)
|
||||
finally:
|
||||
if f:
|
||||
f.close()
|
||||
if stdout is not None:
|
||||
try:
|
||||
f = open(test + '.log', 'w')
|
||||
f.write(stdout)
|
||||
if leakReport:
|
||||
f.write(leakReport)
|
||||
finally:
|
||||
if f:
|
||||
f.close()
|
||||
|
||||
# Remove the leak detection file (here) so it can't "leak" to the next test.
|
||||
# The file is not there if leak logging was not enabled in the xpcshell build.
|
||||
|
Loading…
Reference in New Issue
Block a user