From 52d3d75170b4737f03bf7d66b67518f238f70c34 Mon Sep 17 00:00:00 2001 From: Christopher Degawa Date: Sun, 26 Dec 2021 15:21:05 -0600 Subject: [PATCH] add support for {#} similar to parallel allows for `--gtest_output=xml:reports/report_{#}.xml` to be used instead of relying on googletest itself to lock a unique filename and using that Signed-off-by: Christopher Degawa --- gtest_parallel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtest_parallel.py b/gtest_parallel.py index f4ab26a..cb0eb04 100755 --- a/gtest_parallel.py +++ b/gtest_parallel.py @@ -662,7 +662,8 @@ def find_tests(binaries, additional_args, options, times): if options.failed and last_execution_time is not None: continue - test_command = command + ['--gtest_filter=' + test_name] + test_command = [a.replace('{#}', f"{test_count}") + for a in command] + ['--gtest_filter=' + test_name] if (test_count - options.shard_index) % options.shard_count == 0: for execution_number in range(options.repeat): tasks.append(