am 385c07a7: Merge "Fix parse of gtest_filter in bionic gtest main."

* commit '385c07a74ca5438a6f7fe0ada2b461f880563073':
  Fix parse of gtest_filter in bionic gtest main.
This commit is contained in:
Yabin Cui
2015-01-27 22:05:40 +00:00
committed by Android Git Automerger

View File

@@ -770,9 +770,14 @@ static bool PickOptions(std::vector<char*>& args, IsolationTestOptions& options)
} else {
if (gtest_filter_str == "") {
gtest_filter_str = "--gtest_filter=-bionic_selftest*";
} else {
// 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()));
}