Backed out changeset c63d8f19a893 for failures in Android mochitests.

This commit is contained in:
Ms2ger 2014-04-12 12:00:37 +02:00
parent 313c4d70e0
commit a380556a71
3 changed files with 4 additions and 26 deletions

View File

@ -184,7 +184,7 @@ class MochitestRunner(MozbuildObject):
return mochitest.run_remote_mochitests(parser, options)
def run_desktop_test(self, context, suite=None, test_paths=None, debugger=None,
debugger_args=None, slowscript=False, screenshot_on_fail=False, shuffle=False, keep_open=False,
debugger_args=None, slowscript=False, shuffle=False, keep_open=False,
rerun_failures=False, no_autorun=False, repeat=0, run_until_failure=False,
slow=False, chunk_by_dir=0, total_chunks=None, this_chunk=None,
jsdebugger=False, debug_on_failure=False, start_at=None, end_at=None,
@ -293,7 +293,6 @@ class MochitestRunner(MozbuildObject):
options.autorun = not no_autorun
options.closeWhenDone = not keep_open
options.slowscript = slowscript
options.screenshotOnFail = screenshot_on_fail
options.shuffle = shuffle
options.consoleLevel = 'INFO'
options.repeat = repeat
@ -412,10 +411,6 @@ def MochitestCommand(func):
help='Do not set the JS_DISABLE_SLOW_SCRIPT_SIGNALS env variable; when not set, recoverable but misleading SIGSEGV instances may occur in Ion/Odin JIT code')
func = slowscript(func)
screenshot_on_fail = CommandArgument('--screenshot-on-fail', action='store_true',
help='Take screenshots on all test failures. Set $MOZ_UPLOAD_DIR to a directory for storing the screenshots.')
func = screenshot_on_fail(func)
shuffle = CommandArgument('--shuffle', action='store_true',
help='Shuffle execution order.')
func = shuffle(func)

View File

@ -397,12 +397,6 @@ class MochitestOptions(optparse.OptionParser):
"when not set, recoverable but misleading SIGSEGV instances "
"may occur in Ion/Odin JIT code."
}],
[["--screenshot-on-fail"],
{ "action": "store_true",
"default": False,
"dest": "screenshotOnFail",
"help": "Take screenshots on all test failures. Set $MOZ_UPLOAD_DIR to a directory for storing the screenshots."
}],
[["--quiet"],
{ "action": "store_true",
"default": False,

View File

@ -890,8 +890,7 @@ class Mochitest(MochitestUtilsMixin):
timeout=-1,
onLaunch=None,
webapprtChrome=False,
hide_subtests=False,
screenshotOnFail=False):
hide_subtests=False):
"""
Run the app, log the duration it took to execute, return the status code.
Kills the app if it runs for longer than |maxTime| seconds, or outputs nothing for |timeout| seconds.
@ -981,7 +980,6 @@ class Mochitest(MochitestUtilsMixin):
utilityPath=utilityPath,
symbolsPath=symbolsPath,
dump_screen_on_timeout=not debuggerInfo,
dump_screen_on_fail=screenshotOnFail,
hide_subtests=hide_subtests,
shutdownLeaks=shutdownLeaks,
)
@ -1153,7 +1151,6 @@ class Mochitest(MochitestUtilsMixin):
options.app,
profile=self.profile,
extraArgs=options.browserArgs,
screenshotOnFail=options.screenshotOnFail,
utilityPath=options.utilityPath,
xrePath=options.xrePath,
certPath=options.certPath,
@ -1215,7 +1212,7 @@ class Mochitest(MochitestUtilsMixin):
class OutputHandler(object):
"""line output handler for mozrunner"""
def __init__(self, harness, utilityPath, symbolsPath=None, dump_screen_on_timeout=True, dump_screen_on_fail=False,
def __init__(self, harness, utilityPath, symbolsPath=None, dump_screen_on_timeout=True,
hide_subtests=False, shutdownLeaks=None):
"""
harness -- harness instance
@ -1227,7 +1224,6 @@ class Mochitest(MochitestUtilsMixin):
self.utilityPath = utilityPath
self.symbolsPath = symbolsPath
self.dump_screen_on_timeout = dump_screen_on_timeout
self.dump_screen_on_fail = dump_screen_on_fail
self.hide_subtests = hide_subtests
self.shutdownLeaks = shutdownLeaks
@ -1253,7 +1249,6 @@ class Mochitest(MochitestUtilsMixin):
return [self.fix_stack,
self.format,
self.dumpScreenOnTimeout,
self.dumpScreenOnFail,
self.metro_subprocess_id,
self.trackShutdownLeaks,
self.check_test_failure,
@ -1326,13 +1321,7 @@ class Mochitest(MochitestUtilsMixin):
return line.rstrip().decode("UTF-8", "ignore")
def dumpScreenOnTimeout(self, line):
if not self.dump_screen_on_fail and self.dump_screen_on_timeout and "TEST-UNEXPECTED-FAIL" in line and "Test timed out" in line:
self.log_output_buffer()
self.harness.dumpScreen(self.utilityPath)
return line
def dumpScreenOnFail(self, line):
if self.dump_screen_on_fail and "TEST-UNEXPECTED-FAIL" in line:
if self.dump_screen_on_timeout and "TEST-UNEXPECTED-FAIL" in line and "Test timed out" in line:
self.log_output_buffer()
self.harness.dumpScreen(self.utilityPath)
return line