зеркало из https://github.com/mozilla/pjs.git
Bug 431900 - Add a commandline flag to make assertions fatal, for easy use in tinderbox scripts and the like, especially if we eventually set up a run of all the tests that don't trigger assertions and then run them with this argument specified. r=sayrer, a=testonlychange
This commit is contained in:
Родитель
02fb9d91e9
Коммит
3930d06d0d
|
@ -175,6 +175,12 @@ class MochitestOptions(optparse.OptionParser):
|
|||
"than the given number")
|
||||
defaults["leakThreshold"] = 1.0e3000
|
||||
|
||||
self.add_option("--fatal-assertions",
|
||||
action = "store_true", dest = "fatalAssertions",
|
||||
help = "abort testing whenever an assertion is hit "
|
||||
"(requires a debug build to be effective)")
|
||||
defaults["fatalAssertions"] = False
|
||||
|
||||
# -h, --help are automatically handled by OptionParser
|
||||
|
||||
self.set_defaults(**defaults)
|
||||
|
@ -333,6 +339,9 @@ Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
|
|||
|
||||
browserEnv["XPCOM_MEM_BLOAT_LOG"] = LEAK_REPORT_FILE
|
||||
|
||||
if options.fatalAssertions:
|
||||
browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
|
||||
|
||||
start = automation.runApp(testURL, browserEnv, options.app, PROFILE_DIRECTORY,
|
||||
options.browserArgs)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче