Skip to content

Commit

Permalink
Cherry pick PR #1900: Avoid running evergreen specific test targets o…
Browse files Browse the repository at this point in the history
…n non-evergreen platforms (#1903)

Refer to the original PR: #1900

b/302008891

Co-authored-by: Niranjan Yardi <[email protected]>
  • Loading branch information
1 parent 64def2e commit de97945
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions starboard/tools/testing/test_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
FILTER_ALL = 'FILTER_ALL'
DISABLE_TESTING = 'DISABLE_TESTING'

EVERGREEN_ONLY_TESTS = {
'elf_loader_test': {FILTER_ALL},
'installation_manager_test': {FILTER_ALL},
'reset_evergreen_update_test': {FILTER_ALL},
'slot_management_test': {FILTER_ALL},
}


class TestFilter(object):
"""Container for data used to filter out a unit test.
Expand Down
1 change: 1 addition & 0 deletions starboard/win/win32/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def GetTestFilters(self):
return [test_filter.DISABLE_TESTING]
else:
filters = super().GetTestFilters()
_FILTERED_TESTS.update(test_filter.EVERGREEN_ONLY_TESTS)
for target, tests in _FILTERED_TESTS.items():
filters.extend(test_filter.TestFilter(target, test) for test in tests)
if os.environ.get('EXPERIMENTAL_CI', '0') == '1':
Expand Down
1 change: 1 addition & 0 deletions starboard/xb1/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def GetTestFilters(self):
return [test_filter.DISABLE_TESTING]

filters = super().GetTestFilters()
_FILTERED_TESTS.update(test_filter.EVERGREEN_ONLY_TESTS)
for target, tests in _FILTERED_TESTS.items():
filters.extend(test_filter.TestFilter(target, test) for test in tests)
return filters

0 comments on commit de97945

Please sign in to comment.