summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/android/test_package_apk.py2
-rw-r--r--testing/android/native_test_launcher.cc14
2 files changed, 8 insertions, 8 deletions
diff --git a/build/android/test_package_apk.py b/build/android/test_package_apk.py
index 120fdf5..62b8edf 100644
--- a/build/android/test_package_apk.py
+++ b/build/android/test_package_apk.py
@@ -46,7 +46,7 @@ class TestPackageApk(TestPackage):
command_line_file.write(self.test_suite_basename + ' ' + options)
command_line_file.flush()
self.adb.PushIfNeeded(command_line_file.name,
- TestPackageApk.APK_DATA_DIR +
+ '/data/local/tmp/' +
'chrome-native-tests-command-line')
def _GetGTestReturnCode(self):
diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc
index ad1db27..d8caaaa 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;