You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bb...@apache.org on 2018/11/12 12:39:49 UTC

[mesos] branch master updated (a812a0b -> 77b088b)

This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git.


    from a812a0b  Renamed a function argument to not reuse member name.
     new ca47066  Explicitly constructed command line args in parallel runner.
     new 77b088b  Always used absolute executable paths in parallel runner.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 support/mesos-gtest-runner.py | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)


[mesos] 01/02: Explicitly constructed command line args in parallel runner.

Posted by bb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit ca470667c5522b8cf41ad65cb12adadca771eb47
Author: Benjamin Bannier <bb...@apache.org>
AuthorDate: Sun Nov 11 00:25:36 2018 +0100

    Explicitly constructed command line args in parallel runner.
    
    This fixes issues with flag propagation into shards.
    
    Review: https://reviews.apache.org/r/69309
---
 support/mesos-gtest-runner.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/support/mesos-gtest-runner.py b/support/mesos-gtest-runner.py
index 043f136..255ac13 100755
--- a/support/mesos-gtest-runner.py
+++ b/support/mesos-gtest-runner.py
@@ -30,11 +30,11 @@ wrapper around that functionality and stream-lined output.
 import argparse
 import multiprocessing
 import os
+import resource
 import shlex
 import signal
 import subprocess
 import sys
-import resource
 
 
 class Bcolors:
@@ -69,9 +69,9 @@ def run_test(opts):
     Perform an actual run of the test executable.
 
     Expects a list of parameters giving the number of the current
-    shard, the total number of shards, and the executable to run.
+    shard, the total number of shards, and the command line to run.
     """
-    shard, nshards, executable = opts
+    shard, nshards, args = opts
 
     signal.signal(signal.SIGINT, signal.SIG_IGN)
 
@@ -81,7 +81,7 @@ def run_test(opts):
 
     try:
         output = subprocess.check_output(
-            executable.split(),
+            args,
             stderr=subprocess.STDOUT,
             env=env,
             universal_newlines=True)
@@ -242,17 +242,18 @@ if __name__ == '__main__':
         """
         opts = list(range(jobs))
 
+        args = [os.path.abspath(executable)]
+
         # If we run in a terminal, enable colored test output. We
         # still allow users to disable this themselves via extra args.
         if sys.stdout.isatty():
-            executable = '{exe} --gtest_color=yes'.format(exe=executable)
+            args.append('--gtest_color=yes')
 
         if filter_:
-            executable = '{exe} --gtest_filter={filter}'\
-                         .format(exe=executable, filter=filter_)
+            args.append('--gtest_filter={filter}'.format(filter=filter_))
 
         for opt in opts:
-            yield opt, jobs, executable
+            yield opt, jobs, args
 
     try:
         RESULTS = []


[mesos] 02/02: Always used absolute executable paths in parallel runner.

Posted by bb...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit 77b088b1975d4f5f4a8a217c65fc0af4dae6ed17
Author: Benjamin Bannier <bb...@apache.org>
AuthorDate: Fri Nov 9 22:06:57 2018 +0100

    Always used absolute executable paths in parallel runner.
    
    This allows executing test which are just passed as file names, not as
    relative or absolute paths.
    
    Review: https://reviews.apache.org/r/69310
---
 support/mesos-gtest-runner.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/mesos-gtest-runner.py b/support/mesos-gtest-runner.py
index 255ac13..94cc1a6 100755
--- a/support/mesos-gtest-runner.py
+++ b/support/mesos-gtest-runner.py
@@ -234,6 +234,8 @@ if __name__ == '__main__':
     EXECUTABLE, OPTIONS = parse_arguments()
     validate_setup(OPTIONS)
 
+    EXECUTABLE = os.path.abspath(EXECUTABLE)
+
     def options_gen(executable, filter_, jobs):
         """Generator for options for a certain shard.