зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1074014
- allow verbose=true in xpcshell test manifests. r=ted
This commit is contained in:
Родитель
c6fc5e44a9
Коммит
1a137f9914
|
@ -1245,8 +1245,10 @@ class XPCShellTests(object):
|
|||
|
||||
test = testClass(test_object, self.event, self.cleanup_dir_list,
|
||||
tests_root_dir=testsRootDir, app_dir_key=appDirKey,
|
||||
interactive=interactive, verbose=verbose, pStdout=pStdout,
|
||||
pStderr=pStderr, keep_going=keepGoing, log=self.log,
|
||||
interactive=interactive,
|
||||
verbose=verbose or test_object.get("verbose") == "true",
|
||||
pStdout=pStdout, pStderr=pStderr,
|
||||
keep_going=keepGoing, log=self.log,
|
||||
mobileArgs=mobileArgs, **kwargs)
|
||||
if 'run-sequentially' in test_object or self.sequential:
|
||||
sequential_tests.append(test)
|
||||
|
|
|
@ -219,6 +219,10 @@ let error = {
|
|||
function run_test() {do_report_unexpected_exception(error)};
|
||||
'''
|
||||
|
||||
ADD_TEST_VERBOSE = '''
|
||||
function run_test() {do_print("a message from do_print")};
|
||||
'''
|
||||
|
||||
# A test for genuine JS-generated Error objects
|
||||
ADD_TEST_REPORT_REF_ERROR = '''
|
||||
function run_test() {
|
||||
|
@ -938,6 +942,39 @@ tail =
|
|||
self.assertInLog("test_error.js:4")
|
||||
self.assertNotInLog(TEST_PASS_STRING)
|
||||
|
||||
def testDoPrintWhenVerboseNotExplicit(self):
|
||||
"""
|
||||
Check that do_print() and similar calls that generate output do
|
||||
not have the output when not run verbosely.
|
||||
"""
|
||||
self.writeFile("test_verbose.js", ADD_TEST_VERBOSE)
|
||||
self.writeManifest(["test_verbose.js"])
|
||||
|
||||
self.assertTestResult(True)
|
||||
self.assertNotInLog("a message from do_print")
|
||||
|
||||
def testDoPrintWhenVerboseExplicit(self):
|
||||
"""
|
||||
Check that do_print() and similar calls that generate output have the
|
||||
output shown when run verbosely.
|
||||
"""
|
||||
self.writeFile("test_verbose.js", ADD_TEST_VERBOSE)
|
||||
self.writeManifest(["test_verbose.js"])
|
||||
self.assertTestResult(True, verbose=True)
|
||||
self.assertInLog("a message from do_print")
|
||||
|
||||
def testDoPrintWhenVerboseInManifest(self):
|
||||
"""
|
||||
Check that do_print() and similar calls that generate output have the
|
||||
output shown when 'verbose = true' is in the manifest, even when
|
||||
not run verbosely.
|
||||
"""
|
||||
self.writeFile("test_verbose.js", ADD_TEST_VERBOSE)
|
||||
self.writeManifest([("test_verbose.js", "verbose = true")])
|
||||
|
||||
self.assertTestResult(True)
|
||||
self.assertInLog("a message from do_print")
|
||||
|
||||
def testAsyncCleanup(self):
|
||||
"""
|
||||
Check that do_register_cleanup handles nicely cleanup tasks that
|
||||
|
|
Загрузка…
Ссылка в новой задаче