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:
jwalden@mit.edu 2008-05-06 10:40:41 -07:00
Родитель 02fb9d91e9
Коммит 3930d06d0d
1 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -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)