Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(168)

Unified Diff: testing/android/native_test/main_runner.cc

Issue 2622073004: Fix IPC and base tests on ASAN Android bot. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/native_test/main_runner.cc
diff --git a/testing/android/native_test/main_runner.cc b/testing/android/native_test/main_runner.cc
index 629721f79a4c6da703a166a3992ed48776120b13..2dc41f3842496d4d613a16bdee89bf0f1efcf515 100644
--- a/testing/android/native_test/main_runner.cc
+++ b/testing/android/native_test/main_runner.cc
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "base/posix/global_descriptors.h"
#include "jni/MainRunner_jni.h"
+#include "testing/android/native_test/native_test_util.h"
extern int main(int argc, char** argv);
@@ -44,12 +45,9 @@ static jint RunMain(
std::vector<std::string> cpp_command_line;
AppendJavaStringArrayToStringVector(env, command_line, &cpp_command_line);
- std::vector<char*> c_command_line;
- for (auto& entry : cpp_command_line) {
- c_command_line.push_back(&entry[0]);
- }
-
- return main(c_command_line.size(), &c_command_line[0]);
+ std::vector<char*> argv;
+ int argc = ArgsToArgv(cpp_command_line, &argv);
+ return main(argc, &argv[0]);
}
} // namespace android
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698