summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-23 23:21:09 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-04-23 23:21:09 +0000
commit974e52af636953684a94c564b5cda0c4f3c0151e (patch)
tree671d16b31f592b07097559395d06aa113ca104ea
parentc1e5c672a7ca4f1373514edf1e7cfe60a777df37 (diff)
parent4ab89ae5f1cc3d2af34fac4598d65a66cfd3a06a (diff)
downloadgtest_extras-sdk-release.tar.gz
Snap for 11754915 from 4ab89ae5f1cc3d2af34fac4598d65a66cfd3a06a to sdk-releasesdk-release
Change-Id: Ibe186971c3dfeccb854c7d62ce60d6925ec761f1
-rw-r--r--IsolateMain.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/IsolateMain.cpp b/IsolateMain.cpp
index 853d7e4..0d214f9 100644
--- a/IsolateMain.cpp
+++ b/IsolateMain.cpp
@@ -174,20 +174,20 @@ int IsolateMain(int argc, char** argv, char**) {
std::vector<char*> child_args;
android::gtest_extras::Options options;
- if (!options.Process(args, &child_args)) {
- return 1;
+ int return_val = 1;
+ if (options.Process(args, &child_args)) {
+ // Add the --no_isolate option to force child processes not to rerun
+ // in isolation mode.
+ child_args.push_back(strdup("--no_isolate"));
+
+ // Set the flag values.
+ ::testing::GTEST_FLAG(color) = options.color();
+ ::testing::GTEST_FLAG(print_time) = options.print_time();
+
+ android::gtest_extras::Isolate isolate(options, child_args);
+ return_val = isolate.Run();
}
- // Add the --no_isolate option to force child processes not to rerun
- // in isolation mode.
- child_args.push_back(strdup("--no_isolate"));
-
- // Set the flag values.
- ::testing::GTEST_FLAG(color) = options.color();
- ::testing::GTEST_FLAG(print_time) = options.print_time();
-
- android::gtest_extras::Isolate isolate(options, child_args);
- int return_val = isolate.Run();
for (auto child_arg : child_args) {
free(child_arg);
}