summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 08:51:06 +0000
committertimurrrr@chromium.org <timurrrr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-01 08:51:06 +0000
commit3cdd72ecbc8d7cbe5dd741abafd343352c4f2e1e (patch)
treedc15d79208a49b8af9ed32c6df63b4acee933daf
parent0c81d4190396f88083cafecc579c378d67d81d34 (diff)
downloadchromium_src-3cdd72ecbc8d7cbe5dd741abafd343352c4f2e1e.zip
chromium_src-3cdd72ecbc8d7cbe5dd741abafd343352c4f2e1e.tar.gz
chromium_src-3cdd72ecbc8d7cbe5dd741abafd343352c4f2e1e.tar.bz2
Slightly simplify the command line when one invokes chrome_tests with --gtest_filter=One.Test
This is also helpful if you want to run one excluded test locally. Review URL: http://codereview.chromium.org/8751001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112429 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/valgrind/chrome_tests.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/valgrind/chrome_tests.py b/tools/valgrind/chrome_tests.py
index 5e10bd2..8fcc6ca 100755
--- a/tools/valgrind/chrome_tests.py
+++ b/tools/valgrind/chrome_tests.py
@@ -127,9 +127,18 @@ class ChromeTests:
return self._test_list[self._test](self)
def _AppendGtestFilter(self, tool, name, cmd):
- '''Read a file which is a list of tests to filter out with --gtest_filter
- and append the command-line option to cmd.
+ '''Append an appropriate --gtest_filter flag to the googletest binary
+ invocation.
+ If the user passed his own filter mentioning only one test, just use it.
+ Othewise, filter out tests listed in the appropriate gtest_exclude files.
'''
+ if (self._gtest_filter and
+ ":" not in self._gtest_filter and
+ "?" not in self._gtest_filter and
+ "*" not in self._gtest_filter):
+ cmd.append("--gtest_filter=%s" % self._gtest_filter)
+ return
+
filters = []
gtest_files_dir = os.path.join(path_utils.ScriptDir(), "gtest_exclude")