test.py: only access combined_tests if it exists

When the scylla source tree is only partially built,
we still may want to run the tests.

test.py builds a case cache at boot, and executes
--list-cases for that, for all built tests.

After amalgamating boost unit tests into a single
file, it started running it unconditionally, which broke
partial builds.

Hence, only use combined_tests executable if it exists.

Fixes #22038
This commit is contained in:
Konstantin Osipov
2024-12-27 14:54:13 -05:00
parent 2b1ba9c3fd
commit 8b7a5ca88d

View File

@@ -373,7 +373,8 @@ class BoostTestSuite(UnitTestSuite):
def _generate_cache(self) -> None:
# Apply combined test only for test/boost
if self.name != 'boost':
exe_path = pathlib.Path(self.mode, "test", self.name, 'combined_tests')
if self.name != 'boost' or not exe_path.exists():
return
exe = path_to(self.mode, "test", self.name, 'combined_tests')
res = subprocess.run(