Skip to content

Commit

Permalink
Avoid running evergreen specific test targets on non-evergreen platfo…
Browse files Browse the repository at this point in the history
…rms (#1900)

b/302008891
  • Loading branch information
niranjanyardi committed Nov 3, 2023
1 parent cb8bd95 commit 098af6c
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 @@ -91,6 +91,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 098af6c

Please sign in to comment.