Skip to content

Commit 81f4a42

Browse files
Add topology filter to runner
1 parent 6bf3837 commit 81f4a42

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

redis_benchmarks_specification/__runner__/args.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,9 @@ def create_client_runner_args(project_name):
219219
default="",
220220
help="UNIX Domain socket name",
221221
)
222+
parser.add_argument(
223+
"--topology",
224+
default="",
225+
help="Filter tests to run only with the specified topology (e.g. oss-standalone)",
226+
)
222227
return parser

redis_benchmarks_specification/__runner__/runner.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,19 @@ def main():
9797
)
9898
args = parser.parse_args()
9999

100-
run_client_runner_logic(args, project_name, project_name_suffix, project_version)
100+
# Debug output
101+
print("DEBUG: Starting main function")
102+
print(f"DEBUG: Topology filter: {args.topology}")
103+
104+
# Redirect stdout to a file for debugging
105+
import sys
106+
original_stdout = sys.stdout
107+
with open('debug_output.txt', 'w') as f:
108+
sys.stdout = f
109+
print("DEBUG: Redirected stdout to file")
110+
print(f"DEBUG: Topology filter: {args.topology}")
111+
run_client_runner_logic(args, project_name, project_name_suffix, project_version)
112+
sys.stdout = original_stdout
101113

102114

103115
def run_client_runner_logic(args, project_name, project_name_suffix, project_version):
@@ -383,6 +395,11 @@ def delete_temporary_files(
383395
shutil.rmtree(temporary_dir_client, ignore_errors=True)
384396
logging.info(f"Removing temporary client dir {temporary_dir_client}")
385397

398+
# Debug output
399+
print(f"DEBUG: Starting process_self_contained_coordinator_stream")
400+
print(f"DEBUG: Topology filter: {args.topology}")
401+
print(f"DEBUG: Test files: {testsuite_spec_files}")
402+
386403
overall_result = True
387404
results_matrix = []
388405
total_test_suite_runs = 0
@@ -418,7 +435,18 @@ def delete_temporary_files(
418435
)
419436
)
420437

438+
print(f"DEBUG: Test file: {test_file}, Test name: {test_name}")
439+
print(f"DEBUG: Available topologies: {benchmark_config['redis-topologies']}")
440+
421441
for topology_spec_name in benchmark_config["redis-topologies"]:
442+
# Filter by topology if specified
443+
if args.topology and args.topology != "":
444+
if topology_spec_name != args.topology:
445+
print(f"DEBUG: Skipping topology {topology_spec_name} as it doesn't match the requested topology {args.topology}")
446+
continue
447+
else:
448+
print(f"DEBUG: Running topology {topology_spec_name} as it matches the requested topology {args.topology}")
449+
422450
test_result = False
423451
benchmark_tool_global = ""
424452
full_result_path = None

0 commit comments

Comments
 (0)