Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Side by Side Diff: third_party/gtest-parallel/gtest-parallel-wrapper.py

Issue 2513073002: Update gtest-parallel and introduce gtest-parallel-wrapper. (Closed)
Patch Set: Updated README.webrtc. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/gtest-parallel/gtest-parallel ('k') | tools/mb/mb.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2
3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
4 #
5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree.
10
11 import os
12 import subprocess
13 import sys
14
15 # GTEST_SHARD_INDEX and GTEST_TOTAL_SHARDS must be removed from the environment
16 # otherwise it will be picked up by the binary, causing a bug where only tests
17 # in the firsh shard are executed.
18 test_env = os.environ.copy()
19 gtest_shard_index = test_env.pop('GTEST_SHARD_INDEX', '0')
20 gtest_total_shards = test_env.pop('GTEST_TOTAL_SHARDS', '1')
21
22 gtest_parallel_path = os.path.dirname(os.path.abspath(__file__))
23 gtest_parallel_path = os.path.join(gtest_parallel_path, 'gtest-parallel')
24
25 command = [
26 sys.executable,
27 gtest_parallel_path,
28 '--shard_count',
29 gtest_total_shards,
30 '--shard_index',
31 gtest_shard_index,
32 ] + sys.argv[1:]
33
34 print 'gtest-parallel-wrapper: Executing command %s' % ' '.join(command)
35 sys.stdout.flush()
36
37 sys.exit(subprocess.call(command, env=test_env, cwd=os.getcwd()))
OLDNEW
« no previous file with comments | « third_party/gtest-parallel/gtest-parallel ('k') | tools/mb/mb.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698