Skip to content

Commit 9082000

Browse files
authored
Add support for running only edg tests (#5194)
1 parent 305346e commit 9082000

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

tests/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ get_property(STL_LIT_TEST_DIRS GLOBAL PROPERTY STL_LIT_TEST_DIRS)
3434

3535
add_custom_target(STL-CI COMMAND ${STL_LIT_COMMAND} -Dnotags=ASAN ${STL_LIT_TEST_DIRS} USES_TERMINAL)
3636
add_custom_target(STL-ASan-CI COMMAND ${STL_LIT_COMMAND} -Dtags=ASAN ${STL_LIT_TEST_DIRS} USES_TERMINAL)
37+
add_custom_target(test-only-edg COMMAND ${STL_LIT_COMMAND} -Dnotags=ASAN -Dtest-only-edg=True --xunit-xml-output test-results.xml ${STL_LIT_TEST_DIRS} USES_TERMINAL)

tests/utils/stl/test/params.py

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ def beNice(prio: str) -> list[ConfigAction]:
5858

5959
def getDefaultParameters(config, litConfig):
6060
DEFAULT_PARAMETERS = [
61+
Parameter(name='test-only-edg', choices=[True, False], type=bool, default=False,
62+
help="Whether to only run edg tests (those that use the /BE flag).",
63+
actions=lambda enabled: [AddFeature(name='test-only-edg')] if enabled else []),
6164
Parameter(name='long_tests', choices=[True, False], type=bool, default=True,
6265
help="Whether to run tests that take a long time. This can be useful when running on a slow device.",
6366
actions=lambda enabled: [AddFeature(name='long_tests')] if enabled else []),

tests/utils/stl/test/tests.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,12 @@ def configureTest(self, litConfig):
7171
return Result(UNSUPPORTED, "Test does not require any of the features specified in limit_to_features: %s" %
7272
msg)
7373

74+
if 'test-only-edg' in self.config.available_features and 'edg' not in self.requires:
75+
return Result(UNSUPPORTED, 'We run only /BE tests with the test-only-edg flag')
76+
7477
if 'edg_drop' in self.config.available_features:
75-
if not 'edg' in self.requires:
76-
return Result(UNSUPPORTED, 'We only run /BE tests with the edg drop')
78+
if 'edg' not in self.requires:
79+
return Result(UNSUPPORTED, 'We run only /BE tests with the edg drop')
7780

7881
_, tmpBase = self.getTempPaths()
7982
self.isenseRspPath = tmpBase + '.isense.rsp'

0 commit comments

Comments
 (0)