Skip to content

Commit ff48ca8

Browse files
Compiler unsupported flag (#392)
# Description Skip_unsupported_compiler_tests ## Related Issues <!-- Link related issues e.g. `Fixes #<issue>` --> --------- Signed-off-by: Prashant Gupta <[email protected]>
1 parent a02e178 commit ff48ca8

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

tests/conftest.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ def pytest_collection_modifyitems(config, items):
2525

2626
_skip_all_cb_and_fp8_tests(items)
2727

28+
_skip_unsupported_compiler_tests(config, items)
29+
2830

2931
def _mark_all_e2e(items):
3032
"""Mark all tests within the e2e package with the e2e marker"""
@@ -77,6 +79,21 @@ def _skip_all_cb_and_fp8_tests(items):
7779
item.add_marker(skip_marker)
7880

7981

82+
def _skip_unsupported_compiler_tests(config, items):
83+
"""Skip all tests that need compiler changes to run.
84+
This can be relaxed once the compiler changes are in place
85+
"""
86+
87+
markexpr = config.option.markexpr
88+
if "compiler_support_16k" in markexpr:
89+
return # let pytest handle the collection logic
90+
91+
skip_marker = pytest.mark.skip(reason="Needs compiler changes")
92+
for item in items:
93+
if "spyre" in item.keywords and "compiler_support_16k" in item.keywords:
94+
item.add_marker(skip_marker)
95+
96+
8097
@pytest.fixture(autouse=True)
8198
def init_test_http_connection():
8299
# pytest_asyncio may use a different event loop per test

tests/e2e/test_spyre_cb.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def test_api_cb_generates_correct_max_tokens(
109109
assert response.usage.completion_tokens == max_tokens
110110

111111

112+
@pytest.mark.compiler_support_16k
112113
@pytest.mark.cb
113114
@pytest.mark.parametrize("model", get_spyre_model_list())
114115
@pytest.mark.parametrize(
@@ -184,6 +185,7 @@ def test_long_context_batches(
184185
force_engine_shutdown(vllm_model)
185186

186187

188+
@pytest.mark.compiler_support_16k
187189
@pytest.mark.spyre
188190
@pytest.mark.cb
189191
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)