You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ti...@apache.org on 2016/11/07 12:21:47 UTC
mesos git commit: Fixed parallel test runner for empty GTEST_FILTER.
Repository: mesos
Updated Branches:
refs/heads/master 9cea997c8 -> b64ab6c56
Fixed parallel test runner for empty GTEST_FILTER.
We need to correctly distinguish between the environment variable
GTEST_FILTER being unset, and containing an empty string. In the first
case we want to run all tests, while in the latter none at all.
Review: https://reviews.apache.org/r/53304/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b64ab6c5
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b64ab6c5
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b64ab6c5
Branch: refs/heads/master
Commit: b64ab6c56ef8b5549a1162316c78bc7a499fa923
Parents: 9cea997
Author: Benjamin Bannier <be...@mesosphere.io>
Authored: Mon Nov 7 12:52:18 2016 +0100
Committer: Till Toenshoff <to...@me.com>
Committed: Mon Nov 7 12:52:18 2016 +0100
----------------------------------------------------------------------
support/mesos-gtest-runner.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b64ab6c5/support/mesos-gtest-runner.py
----------------------------------------------------------------------
diff --git a/support/mesos-gtest-runner.py b/support/mesos-gtest-runner.py
index 3e736d5..101dea8 100755
--- a/support/mesos-gtest-runner.py
+++ b/support/mesos-gtest-runner.py
@@ -164,7 +164,9 @@ def parse_arguments():
file=sys.stderr)
sys.exit(1)
- if os.environ.get('GTEST_FILTER'):
+ # Since empty strings are falsy, directly compare against `None`
+ # to preserve an empty string passed via `GTEST_FILTER`.
+ if os.environ.get('GTEST_FILTER') != None:
options.parallel = '{env_filter}:-{sequential_filter}'\
.format(env_filter=os.environ['GTEST_FILTER'],
sequential_filter=options.sequential)