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
diff --git a/third_party/gtest-parallel/README.webrtc b/third_party/gtest-parallel/README.webrtc
index b16e615..658ef95 100644
--- a/third_party/gtest-parallel/README.webrtc
+++ b/third_party/gtest-parallel/README.webrtc
@@ -1,5 +1,5 @@
 URL: https://github.com/google/gtest-parallel
-Version: ebf302fdc83f2c5afb9b7b45dc14dd0807b9e67d
+Version: e61a8975cc124c9a07cb903b76b46b3e669cd179
 License: Apache 2.0
 License File: LICENSE
 
diff --git a/third_party/gtest-parallel/gtest-parallel b/third_party/gtest-parallel/gtest-parallel
index 58affcb..2830e81 100755
--- a/third_party/gtest-parallel/gtest-parallel
+++ b/third_party/gtest-parallel/gtest-parallel
@@ -80,8 +80,17 @@
   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 @@
   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():