From e074e2149054e1e821c73c68467f2a9ae459104f Mon Sep 17 00:00:00 2001 From: Andrei Chekun Date: Tue, 25 Nov 2025 13:01:58 +0100 Subject: [PATCH] test.py: introduce new environment variable TESTPY_PREPARED_ENVIRONMENT Introduce the new environment variable that will be used to signalize to the pytest runner that environment war already prepared by test.py. This needed to be able to run the test with pytest and test.py(that actually will run pytest underneath). --- test/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/__init__.py b/test/__init__.py index 757857fc0e..905a7c8fe5 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -10,10 +10,14 @@ import time import os from pathlib import Path -__all__ = ["ALL_MODES", "BUILD_DIR", "DEBUG_MODES", "HOST_ID", "TEST_DIR", "TEST_RUNNER", "TOP_SRC_DIR", "path_to"] +__all__ = ["ALL_MODES", "BUILD_DIR", "DEBUG_MODES", "HOST_ID", "TEST_DIR", "TEST_RUNNER", "TOP_SRC_DIR", "path_to", + "TESTPY_PREPARED_ENVIRONMENT"] TEST_RUNNER = os.environ.get("SCYLLA_TEST_RUNNER", "pytest") +# This is used to mark that test.py has already prepared the environment and pytest +# should skip the part of cleaning or starting 3rd party services +TESTPY_PREPARED_ENVIRONMENT = "TESTPY_PREPARED_ENVIRONMENT" TOP_SRC_DIR = Path(__file__).parent.parent # ScyllaDB's source code root directory TEST_DIR = TOP_SRC_DIR / "test"