t fix(ci): allow tests to skip llama stack client instantiation

This commit is contained in:
Ashwin Bharambe 2025-08-06 10:32:38 -07:00
parent dfce05d0c5
commit f0e9d78099
3 changed files with 19 additions and 7 deletions

View file

@ -36,12 +36,15 @@ def pytest_sessionstart(session):
# pull client instantiation to session start so all the complex logs during initialization
# don't clobber the test one-liner outputs
print("instantiating llama_stack_client")
start_time = time.time()
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
session._llama_stack_client = instantiate_llama_stack_client(session)
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
if not getattr(session.config, "skip_llama_stack_client_instantiation", False):
print("instantiating llama_stack_client")
start_time = time.time()
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=DeprecationWarning)
session._llama_stack_client = instantiate_llama_stack_client(session)
print(f"llama_stack_client instantiated in {time.time() - start_time:.3f}s")
def pytest_runtest_teardown(item):