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

Unified Diff: testing/android/native_test_launcher.cc

Issue 10398049: Put commandline for apk tests in /data/local/tmp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « build/android/test_package_apk.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/native_test_launcher.cc
diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc
index ad1db27241e30630d4eaa63deaf1a39841574975..d8caaaaaec16a44b1355af6a7bc25734d8d1ae70 100644
--- a/testing/android/native_test_launcher.cc
+++ b/testing/android/native_test_launcher.cc
@@ -73,10 +73,11 @@ void ParseArgsFromString(const std::string& command_line,
}
}
-void ParseArgsFromCommandLineFile(const FilePath& internal_data_path,
- std::vector<std::string>* args) {
- static const char kCommandLineFile[] = "chrome-native-tests-command-line";
- FilePath command_line(internal_data_path.Append(FilePath(kCommandLineFile)));
+void ParseArgsFromCommandLineFile(std::vector<std::string>* args) {
+ // The test runner script can write to "/data/local/tmp".
+ static const char kCommandLineFilePath[] =
+ "/data/local/tmp/chrome-native-tests-command-line";
+ FilePath command_line(kCommandLineFilePath);
std::string command_line_string;
if (file_util::ReadFileToString(command_line, &command_line_string)) {
ParseArgsFromString(command_line_string, args);
@@ -166,8 +167,7 @@ void LibraryLoadedOnMainThread(JNIEnv* env) {
// internal gtest data structures based on the command line.
// It needs to be scoped as it also resets the CommandLine.
std::vector<std::string> args;
- FilePath path("/data/user/0/org.chromium.native_test/files/");
- ParseArgsFromCommandLineFile(path, &args);
+ ParseArgsFromCommandLineFile(&args);
std::vector<char*> argv;
ArgsToArgv(args, &argv);
base::TestSuite test_suite(argv.size(), &argv[0]);
@@ -206,7 +206,7 @@ static void RunTests(JNIEnv* env,
freopen(stdout_path.value().c_str(), "w", stdout);
std::vector<std::string> args;
- ParseArgsFromCommandLineFile(files_dir, &args);
+ ParseArgsFromCommandLineFile(&args);
// We need to pass in a non-const char**.
std::vector<char*> argv;
« no previous file with comments | « build/android/test_package_apk.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698