From 68cb7169c7f5e9e86119ff677d60eef611f62050 Mon Sep 17 00:00:00 2001 From: Guillaume Raffy Date: Sun, 30 Jun 2024 16:08:10 +0200 Subject: [PATCH] fixed dangerous-default-value / W0102 potential problem --- src/starbench/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/starbench/main.py b/src/starbench/main.py index f8a66af..bc619f8 100755 --- a/src/starbench/main.py +++ b/src/starbench/main.py @@ -339,7 +339,7 @@ class GitRepos(IFileTreeProvider): return self.src_dir -def starbench_cmake_app(source_code_provider: IFileTreeProvider, tmp_dir: Path, num_cores: int, benchmark_command: List[str], cmake_options: List[str] = [], cmake_exe_location: Path = None): +def starbench_cmake_app(source_code_provider: IFileTreeProvider, tmp_dir: Path, num_cores: int, benchmark_command: List[str], cmake_options: Optional[List[str]] = None, cmake_exe_location: Path = None): """ tests_to_run : regular expression as understood by ctest's -L option. eg '^arch4_quick$' """ @@ -347,6 +347,8 @@ def starbench_cmake_app(source_code_provider: IFileTreeProvider, tmp_dir: Path, # we need one build for each parallel run, otherwise running ctest on parallel would overwrite the same file, which causes the test to randomly fail depnding on race conditions worker_dir = tmp_dir / 'worker' build_dir = worker_dir / 'build' + if cmake_options is None: + cmake_options = [] print(f'creating build directory {worker_dir}') create_build_dir = CommandPerfEstimator( run_command=['mkdir', '-p', str(build_dir)],