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:
pbos@webrtc.org 2015-01-07 11:03:19 +00:00
parent 07c83a1385
commit 1777880f54
2 changed files with 13 additions and 2 deletions

View File

@ -1,5 +1,5 @@
URL: https://github.com/google/gtest-parallel
Version: ebf302fdc83f2c5afb9b7b45dc14dd0807b9e67d
Version: e61a8975cc124c9a07cb903b76b46b3e669cd179
License: Apache 2.0
License File: LICENSE

View File

@ -80,8 +80,17 @@ class RawFormat:
def end(self):
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(
usage = 'usage: %prog [options] executable [executable ...]')
usage = 'usage: %prog [options] binary [binary ...] -- [additional args]')
parser.add_option('-r', '--repeat', type='int', default=1,
help='repeat tests')
@ -122,6 +131,8 @@ for test_binary in binaries:
test_list = subprocess.Popen(command + ['--gtest_list_tests'],
stdout=subprocess.PIPE).communicate()[0]
command += additional_args
test_group = ''
for line in test_list.split('\n'):
if not line.strip():