Bug 1136841 - Fix rungtests.py to check for crashes in the correct directory. r=ahal

This commit is contained in:
Chris Manchester 2016-01-07 12:27:10 -08:00
parent 90999d1029
commit 8c659d0ccc

View File

@ -23,7 +23,7 @@ class GTests(object):
# Time (seconds) in which process will be killed if it produces no output. # Time (seconds) in which process will be killed if it produces no output.
TEST_PROC_NO_OUTPUT_TIMEOUT = 300 TEST_PROC_NO_OUTPUT_TIMEOUT = 300
def run_gtest(self, prog, xre_path, symbols_path=None, cwd=None): def run_gtest(self, prog, xre_path, cwd, symbols_path=None):
""" """
Run a single C++ unit test program. Run a single C++ unit test program.
@ -53,7 +53,7 @@ class GTests(object):
if proc.timedOut: if proc.timedOut:
log.testFail("gtest | timed out after %d seconds", GTests.TEST_PROC_TIMEOUT) log.testFail("gtest | timed out after %d seconds", GTests.TEST_PROC_TIMEOUT)
return False return False
if mozcrash.check_for_crashes(os.getcwd(), symbols_path, test_name="gtest"): if mozcrash.check_for_crashes(cwd, symbols_path, test_name="gtest"):
# mozcrash will output the log failure line for us. # mozcrash will output the log failure line for us.
return False return False
result = proc.proc.returncode == 0 result = proc.proc.returncode == 0
@ -153,8 +153,8 @@ def main():
tester = GTests() tester = GTests()
try: try:
result = tester.run_gtest(prog, options.xre_path, result = tester.run_gtest(prog, options.xre_path,
symbols_path=options.symbols_path, options.cwd,
cwd=options.cwd) symbols_path=options.symbols_path)
except Exception, e: except Exception, e:
log.error(str(e)) log.error(str(e))
result = False result = False