summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-01-27 11:22:46 -0800
committerYabin Cui <yabinc@google.com>2015-01-27 11:22:46 -0800
commit0bc4e9697e75acae012f54352887bba885cf923f (patch)
tree29d4f28eb9ed246c2981f59ff010f4820a654c25 /tests
parent4a82ede75449deb1f554ef95b7ce2e4cd2b5d072 (diff)
downloadbionic-0bc4e9697e75acae012f54352887bba885cf923f.zip
bionic-0bc4e9697e75acae012f54352887bba885cf923f.tar.gz
bionic-0bc4e9697e75acae012f54352887bba885cf923f.tar.bz2
Fix parse of gtest_filter in bionic gtest main.
Bug: 19130330 Change-Id: Id6a60570a8aab6ae7259ff228b3801285b378f77
Diffstat (limited to 'tests')
-rw-r--r--tests/gtest_main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/gtest_main.cpp b/tests/gtest_main.cpp
index 11828ee..b0740b0 100644
--- a/tests/gtest_main.cpp
+++ b/tests/gtest_main.cpp
@@ -771,7 +771,12 @@ static bool PickOptions(std::vector<char*>& args, IsolationTestOptions& options)
if (gtest_filter_str == "") {
gtest_filter_str = "--gtest_filter=-bionic_selftest*";
} else {
- gtest_filter_str += ":-bionic_selftest*";
+ // Find if '-' for NEGATIVE_PATTERNS exists.
+ if (gtest_filter_str.find(":-") != std::string::npos) {
+ gtest_filter_str += ":bionic_selftest*";
+ } else {
+ gtest_filter_str += ":-bionic_selftest*";
+ }
}
args.push_back(strdup(gtest_filter_str.c_str()));
}