Lines Matching +full:- +full:- +full:artifacts +full:- +full:dir
5 # Use of this source code is governed by a BSD-style license
11 # pylint: disable=invalid-name
14 gtest-parallel, renaming options and translating environment variables into
15 flags. Developers should execute gtest-parallel directly.
18 environment variables to the --shard_index and --shard_count flags, renames
19 the --isolated-script-test-output flag to --dump_json_test_results,
20 and interprets e.g. --workers=2x as 2 workers per core.
22 Flags before '--' will be attempted to be understood as arguments to
23 gtest-parallel. If gtest-parallel doesn't recognize the flag or the flag is
24 after '--', the flag will be passed on to the test executable.
26 --isolated-script-test-perf-output is renamed to
27 --isolated_script_test_perf_output. The Android test runner needs the flag to
31 If the --store-test-artifacts flag is set, an --output_dir must be also
34 The test artifacts will then be stored in a 'test_artifacts' subdirectory of the
35 output dir, and will be compressed into a zip file once the test finishes
43 gtest-parallel-wrapper.py some_test \
44 --some_flag=some_value \
45 --another_flag \
46 --output_dir=SOME_OUTPUT_DIR \
47 --store-test-artifacts
48 --isolated-script-test-output=SOME_DIR \
49 --isolated-script-test-perf-output=SOME_OTHER_DIR \
50 -- \
51 --foo=bar \
52 --baz
56 vpython3 gtest-parallel \
57 --shard_index 0 \
58 --shard_count 1 \
59 --output_dir=SOME_OUTPUT_DIR \
60 --dump_json_test_results=SOME_DIR \
62 -- \
63 --test_artifacts_dir=SOME_OUTPUT_DIR/test_artifacts \
64 --some_flag=some_value \
65 --another_flag \
66 --isolated-script-test-perf-output=SOME_OTHER_DIR \
67 --foo=bar \
68 --baz
124 result.append('--%s' % key)
126 result.append('--%s=%s' % (key, value))
134 'Arguments to gtest-parallel')
135 # These options will be passed unchanged to gtest-parallel.
136 gtest_group.AddArgument('-d', '--output_dir')
137 gtest_group.AddArgument('-r', '--repeat')
138 # --isolated-script-test-output is used to upload results to the flakiness
139 # dashboard. This translation is made because gtest-parallel expects the flag
140 # to be called --dump_json_test_results instead.
141 gtest_group.AddArgument('--isolated-script-test-output',
143 gtest_group.AddArgument('--retry_failed')
144 gtest_group.AddArgument('--gtest_color')
145 gtest_group.AddArgument('--gtest_filter')
146 gtest_group.AddArgument('--gtest_also_run_disabled_tests',
149 gtest_group.AddArgument('--timeout')
152 gtest_group.AddArgument('-w', '--workers', type=_ParseWorkersOption)
154 # Needed when the test wants to store test artifacts, because it doesn't
155 # know what will be the swarming output dir.
156 parser.add_argument('--store-test-artifacts', action='store_true')
167 '--output_dir must be specified for storing test artifacts.')
170 executable_args.insert(0, '--test_artifacts_dir=%s' % test_artifacts_dir)
183 gtest_parallel_args.insert(0, '--shard_index=%s' % gtest_shard_index)
184 gtest_parallel_args.insert(1, '--shard_count=%s' % gtest_total_shards)
188 gtest_parallel_args += ['--'] + executable_args
197 'gtest-parallel', 'gtest-parallel')
211 print('gtest-parallel-wrapper: Executing command %s' % ' '.join(command))
218 logs_dir = os.path.join(output_dir, 'gtest-parallel-logs', test_status)
222 log_file = os.path.join(output_dir, '%s-tests.log' % test_status)