summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);
}