diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-12-11 18:06:47 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-12-11 18:06:47 +0000 |
commit | 9187f27e3252446035dfe0e9c4ffa8f3094c3774 (patch) | |
tree | f0df2c07080bc95031a93f89e9b29b51237ce4cc /lldb/packages/Python/lldbsuite/test/result_formatter.py | |
parent | 841b1732dfcf7293094c4aab811e976945bf7977 (diff) | |
download | bcm5719-llvm-9187f27e3252446035dfe0e9c4ffa8f3094c3774.tar.gz bcm5719-llvm-9187f27e3252446035dfe0e9c4ffa8f3094c3774.zip |
Add test event marking a test as explicitly eligible for rerun if it is marked flakey.
This will be used in a future change to support rerunning flakey tests
that hit a test result isue in a low-load, single worker test runner phase.
This is implemented as an additive-style event rather than being
evaluated and added to the start_test event because the decorator code
only runs after the start_test event is created and sent. i.e.
LLDBTestResult.startTest() runs before the test method decorators run.
llvm-svn: 255351
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/result_formatter.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/result_formatter.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/result_formatter.py b/lldb/packages/Python/lldbsuite/test/result_formatter.py index a37a1f9c743..e05714f384b 100644 --- a/lldb/packages/Python/lldbsuite/test/result_formatter.py +++ b/lldb/packages/Python/lldbsuite/test/result_formatter.py @@ -161,6 +161,7 @@ class EventBuilder(object): TYPE_JOB_RESULT = "job_result" TYPE_TEST_RESULT = "test_result" TYPE_TEST_START = "test_start" + TYPE_MARK_TEST_RERUN_ELIGIBLE = "test_eligible_for_rerun" # Test/Job Status Tags STATUS_EXCEPTIONAL_EXIT = "exceptional_exit" @@ -226,6 +227,7 @@ class EventBuilder(object): "test_name": test_name, "test_filename": inspect.getfile(test.__class__) }) + return event @staticmethod @@ -486,6 +488,26 @@ class EventBuilder(object): return event @staticmethod + def event_for_mark_test_rerun_eligible(test): + """Creates an event that indicates the specified test is explicitly + eligible for rerun. + + Note there is a mode that will enable test rerun eligibility at the + global level. These markings for explicit rerun eligibility are + intended for the mode of running where only explicitly rerunnable + tests are rerun upon hitting an issue. + + @param test the TestCase instance to which this pertains. + + @return an event that specifies the given test as being eligible to + be rerun. + """ + event = EventBuilder._event_dictionary_common( + test, + EventBuilder.TYPE_MARK_TEST_RERUN_ELIGIBLE) + return event + + @staticmethod def add_entries_to_all_events(entries_dict): """Specifies a dictionary of entries to add to all test events. |