diff options
author | Yves Duhem <yves.duhem@mongodb.com> | 2017-05-30 17:04:07 -0400 |
---|---|---|
committer | Yves Duhem <yves.duhem@mongodb.com> | 2017-06-05 14:13:07 -0400 |
commit | 0347baa06a6040af11752047fb8503c77c71c61a (patch) | |
tree | 36e0c5370b2434cafd82f46f9dc91df62fb3d131 | |
parent | 89e48e22ba667caad7223eaa2b6ee92868323268 (diff) | |
download | mongo-0347baa06a6040af11752047fb8503c77c71c61a.tar.gz |
SERVER-29192 Prevent 'silentfail' status for dynamic tests
-rwxr-xr-x | buildscripts/combine_reports.py | 4 | ||||
-rw-r--r-- | buildscripts/resmokelib/parser.py | 4 | ||||
-rw-r--r-- | buildscripts/resmokelib/testing/report.py | 7 |
3 files changed, 8 insertions, 7 deletions
diff --git a/buildscripts/combine_reports.py b/buildscripts/combine_reports.py index 94f5494a0c0..2248d98d21c 100755 --- a/buildscripts/combine_reports.py +++ b/buildscripts/combine_reports.py @@ -27,16 +27,12 @@ def report_exit(combined_test_report): """The exit code of this script is based on the following: 0: All tests have status "pass", or only non-dynamic tests have status "silentfail". 31: At least one test has status "fail" or "timeout". - 32: At least one dynamic test has status "silentfail", - but no tests have status "fail" or "timeout". Note: A test can be considered dynamic if its name contains a ":" character.""" ret = 0 for test in combined_test_report.test_infos: if test.status in ["fail", "timeout"]: return 31 - if test.dynamic and test.status == "silentfail": - ret = 32 return ret diff --git a/buildscripts/resmokelib/parser.py b/buildscripts/resmokelib/parser.py index 91dbe9bf3f9..22b468e5b2e 100644 --- a/buildscripts/resmokelib/parser.py +++ b/buildscripts/resmokelib/parser.py @@ -171,8 +171,8 @@ def parse_command_line(): dest="report_failure_status", choices=("fail", "silentfail"), metavar="STATUS", help="Controls if the test failure status should be reported as failed" - " or be silently ignored (STATUS=silentfail). Defaults to" - " STATUS=%default.") + " or be silently ignored (STATUS=silentfail). Dynamic test failures will" + " never be silently ignored. Defaults to STATUS=%default.") parser.add_option("--reportFile", dest="report_file", metavar="REPORT", help="Write a JSON file with test status and timing information.") diff --git a/buildscripts/resmokelib/testing/report.py b/buildscripts/resmokelib/testing/report.py index 088d87782a5..d9270528440 100644 --- a/buildscripts/resmokelib/testing/report.py +++ b/buildscripts/resmokelib/testing/report.py @@ -287,7 +287,12 @@ class TestReport(unittest.TestResult): if convert_failures: if status == "error" or status == "fail": # Don't distinguish between failures and errors. - status = _config.REPORT_FAILURE_STATUS + if test_info.dynamic: + # Dynamic tests are used for data consistency checks, so the failures + # are not silenced. + status = "fail" + else: + status = _config.REPORT_FAILURE_STATUS elif status == "timeout": # Until EVG-1536 is completed, we shouldn't distinguish between failures and # interrupted tests in the report.json file. In Evergreen, the behavior to |