Chromium Code Reviews| Index: scripts/slave/recipes/findit/chromium/test.py |
| diff --git a/scripts/slave/recipes/findit/chromium/test.py b/scripts/slave/recipes/findit/chromium/test.py |
| index dc2f10deba813ed362dab94755b3015e96ae415a..73b1256a7169ed5e277fad3100048385d66403ad 100644 |
| --- a/scripts/slave/recipes/findit/chromium/test.py |
| +++ b/scripts/slave/recipes/findit/chromium/test.py |
| @@ -74,10 +74,20 @@ class TestResult(object): |
| INFRA_FAILED = 'infra_failed' # Infra failed. |
| +def _check_and_remove_test_name(test_names, test_name): |
| + """Check if a test_name is in the list and remove it if it is.""" |
| + try: |
| + test_names.remove(test_name) |
| + return True |
| + except ValueError: |
| + return False |
| + |
| + |
| def _compile_and_test_at_revision(api, target_mastername, target_buildername, |
| target_testername, revision, requested_tests, |
| use_analyze): |
| results = {} |
| + |
| with api.step.nest('test %s' % str(revision)): |
| # Checkout code at the given revision to recompile. |
| bot_config = api.chromium_tests.create_bot_config_object( |
| @@ -87,8 +97,10 @@ def _compile_and_test_at_revision(api, target_mastername, target_buildername, |
| # Figure out which test steps to run. |
| _, all_tests = api.chromium_tests.get_tests(bot_config, bot_db) |
| + requested_test_names = [k for k in requested_tests] |
| requested_tests_to_run = [ |
| - test for test in all_tests if test.name in requested_tests] |
| + test for test in all_tests if |
| + _check_and_remove_test_name(requested_test_names, test.name)] |
|
stgao
2016/06/14 23:40:06
This fix might cause issue.
Each test will has som
|
| # Figure out the test targets to be compiled. |
| requested_test_targets = [] |
| @@ -140,6 +152,7 @@ def _compile_and_test_at_revision(api, target_mastername, target_buildername, |
| # Run the tests. |
| with api.chromium_tests.wrap_chromium_tests( |
| bot_config, actual_tests_to_run): |
| + test_names = [te.name for te in actual_tests_to_run] |
| failed_tests = api.test_utils.run_tests( |
| api, actual_tests_to_run, |
| suffix=revision, test_filters=requested_tests) |