Bug 484604 - OS/2 problem with running the new python test program; r=ted.mielczarek
This commit is contained in:
@@ -125,6 +125,9 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
|||||||
xrePath = os.path.abspath(xrePath)
|
xrePath = os.path.abspath(xrePath)
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
env["PATH"] = env["PATH"] + ";" + xrePath
|
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':
|
elif sys.platform == 'osx':
|
||||||
env["DYLD_LIBRARY_PATH"] = xrePath
|
env["DYLD_LIBRARY_PATH"] = xrePath
|
||||||
else: # unix or linux?
|
else: # unix or linux?
|
||||||
@@ -189,7 +192,10 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
|||||||
|
|
||||||
# Now execute each test individually.
|
# Now execute each test individually.
|
||||||
for test in testfiles:
|
for test in testfiles:
|
||||||
pstdout = PIPE
|
if sys.platform == 'os2emx':
|
||||||
|
pstdout = None
|
||||||
|
else:
|
||||||
|
pstdout = PIPE
|
||||||
pstderr = STDOUT
|
pstderr = STDOUT
|
||||||
interactiveargs = []
|
interactiveargs = []
|
||||||
if interactive:
|
if interactive:
|
||||||
@@ -208,7 +214,7 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
|||||||
# not sure what else to do here...
|
# not sure what else to do here...
|
||||||
return True
|
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:
|
print """TEST-UNEXPECTED-FAIL | %s | test failed (with xpcshell return code: %d), see following log:
|
||||||
>>>>>>>
|
>>>>>>>
|
||||||
%s
|
%s
|
||||||
@@ -220,14 +226,15 @@ def runTests(xpcshell, testdirs=[], xrePath=None, testPath=None,
|
|||||||
|
|
||||||
leakReport = processLeakLog(leakLogFile)
|
leakReport = processLeakLog(leakLogFile)
|
||||||
|
|
||||||
try:
|
if stdout is not None:
|
||||||
f = open(test + '.log', 'w')
|
try:
|
||||||
f.write(stdout)
|
f = open(test + '.log', 'w')
|
||||||
if leakReport:
|
f.write(stdout)
|
||||||
f.write(leakReport)
|
if leakReport:
|
||||||
finally:
|
f.write(leakReport)
|
||||||
if f:
|
finally:
|
||||||
f.close()
|
if f:
|
||||||
|
f.close()
|
||||||
|
|
||||||
# Remove the leak detection file (here) so it can't "leak" to the next test.
|
# 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.
|
# The file is not there if leak logging was not enabled in the xpcshell build.
|
||||||
|
|||||||
Reference in New Issue
Block a user