Roll gtest-parallel.
Includes a method for setting additional arguments to binaries. BUG=4142 R=kjellander@webrtc.org TBR=andrew@webrtc.org Review URL: https://webrtc-codereview.appspot.com/32969004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8009 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
07c83a1385
commit
1777880f54
2
third_party/gtest-parallel/README.webrtc
vendored
2
third_party/gtest-parallel/README.webrtc
vendored
@ -1,5 +1,5 @@
|
|||||||
URL: https://github.com/google/gtest-parallel
|
URL: https://github.com/google/gtest-parallel
|
||||||
Version: ebf302fdc83f2c5afb9b7b45dc14dd0807b9e67d
|
Version: e61a8975cc124c9a07cb903b76b46b3e669cd179
|
||||||
License: Apache 2.0
|
License: Apache 2.0
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
13
third_party/gtest-parallel/gtest-parallel
vendored
13
third_party/gtest-parallel/gtest-parallel
vendored
@ -80,8 +80,17 @@ class RawFormat:
|
|||||||
def end(self):
|
def end(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# Remove additional arguments (anything after --).
|
||||||
|
additional_args = []
|
||||||
|
|
||||||
|
for i in range(len(sys.argv)):
|
||||||
|
if sys.argv[i] == '--':
|
||||||
|
additional_args = sys.argv[i+1:]
|
||||||
|
sys.argv = sys.argv[:i]
|
||||||
|
break
|
||||||
|
|
||||||
parser = optparse.OptionParser(
|
parser = optparse.OptionParser(
|
||||||
usage = 'usage: %prog [options] executable [executable ...]')
|
usage = 'usage: %prog [options] binary [binary ...] -- [additional args]')
|
||||||
|
|
||||||
parser.add_option('-r', '--repeat', type='int', default=1,
|
parser.add_option('-r', '--repeat', type='int', default=1,
|
||||||
help='repeat tests')
|
help='repeat tests')
|
||||||
@ -122,6 +131,8 @@ for test_binary in binaries:
|
|||||||
test_list = subprocess.Popen(command + ['--gtest_list_tests'],
|
test_list = subprocess.Popen(command + ['--gtest_list_tests'],
|
||||||
stdout=subprocess.PIPE).communicate()[0]
|
stdout=subprocess.PIPE).communicate()[0]
|
||||||
|
|
||||||
|
command += additional_args
|
||||||
|
|
||||||
test_group = ''
|
test_group = ''
|
||||||
for line in test_list.split('\n'):
|
for line in test_list.split('\n'):
|
||||||
if not line.strip():
|
if not line.strip():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user