summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-01-27 22:00:35 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-01-27 22:00:35 +0000
commit385c07a74ca5438a6f7fe0ada2b461f880563073 (patch)
tree1768b47dc5f184c03641a70a57dba1c797c960e0 /tests
parent86d9896273e81941d16034fdbf781a3f2bf94b81 (diff)
parent0bc4e9697e75acae012f54352887bba885cf923f (diff)
downloadbionic-385c07a74ca5438a6f7fe0ada2b461f880563073.zip
bionic-385c07a74ca5438a6f7fe0ada2b461f880563073.tar.gz
bionic-385c07a74ca5438a6f7fe0ada2b461f880563073.tar.bz2
Merge "Fix parse of gtest_filter in bionic gtest main."
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()));
}