diff --git a/test.py b/test.py index 2022054735..4b725b1b2c 100755 --- a/test.py +++ b/test.py @@ -613,7 +613,7 @@ class CQLApprovalTest(Test): def __init__(self, test_no: int, shortname: str, suite) -> None: super().__init__(test_no, shortname, suite) # Path to cql_repl driver, in the given build mode - self.path = "pytest" + self.path = "./test/pytest" self.cql = suite.suite_path / (self.shortname + ".cql") self.result = suite.suite_path / (self.shortname + ".result") self.tmpfile = os.path.join(suite.options.tmpdir, self.mode, self.uname + ".reject") @@ -769,7 +769,7 @@ class PythonTest(Test): def __init__(self, test_no: int, shortname: str, suite) -> None: super().__init__(test_no, shortname, suite) - self.path = "pytest" + self.path = "./test/pytest" self.xmlout = os.path.join(self.suite.options.tmpdir, self.mode, "xml", self.uname + ".xunit.xml") self.server_log: Optional[str] = None self.server_log_filename: Optional[pathlib.Path] = None diff --git a/test/pytest b/test/pytest new file mode 100755 index 0000000000..f478e06899 --- /dev/null +++ b/test/pytest @@ -0,0 +1,7 @@ +#!/bin/sh -e + +# Modern pytest excludes site-packages, so it doesn't see scylla-driver. +# This script is a workaround. + +exec python -m pytest "$@" +