diff options
author | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 10:58:45 +0000 |
---|---|---|
committer | bulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-21 10:58:45 +0000 |
commit | dc68f705de044bcbe89650885753de6ebaa705c2 (patch) | |
tree | f3cebe3eaca048aa73c00ed0e2d76f475aa11d2b /testing | |
parent | d0c1412146f356ca61f1dd02f47e87a9498d018c (diff) | |
download | chromium_src-dc68f705de044bcbe89650885753de6ebaa705c2.zip chromium_src-dc68f705de044bcbe89650885753de6ebaa705c2.tar.gz chromium_src-dc68f705de044bcbe89650885753de6ebaa705c2.tar.bz2 |
Android: creates fifo for test runners in internal directory.
Some devices have $EXTERNAL_STORAGE filesystems that don't support
mkfifo. Create in the internal app dir instead.
BUG=
TEST=
Review URL: https://codereview.chromium.org/10957036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157962 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'testing')
-rw-r--r-- | testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java | 5 | ||||
-rw-r--r-- | testing/android/native_test_launcher.cc | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java index a93772a..b984c48 100644 --- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java +++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java @@ -70,10 +70,7 @@ public class ChromeNativeTestActivity extends Activity { private void runTests() { // This directory is used by build/android/pylib/test_package_apk.py. - File filesDir = new File(Environment.getExternalStorageDirectory(), - "native_tests/"); - filesDir.mkdirs(); - nativeRunTests(filesDir.getAbsolutePath(), getApplicationContext()); + nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext()); } // Signal a failure of the native test loader to python scripts diff --git a/testing/android/native_test_launcher.cc b/testing/android/native_test_launcher.cc index 99d9b29..ade30b2 100644 --- a/testing/android/native_test_launcher.cc +++ b/testing/android/native_test_launcher.cc @@ -118,7 +118,8 @@ int ArgsToArgv(const std::vector<std::string>& args, void CreateFIFO(const char* fifo_path) { unlink(fifo_path); - if (mkfifo(fifo_path, 0666)) { + // Default permissions for mkfifo is ignored, chmod is required. + if (mkfifo(fifo_path, 0666) || chmod(fifo_path, 0666)) { AndroidLogError("Failed to create fifo %s: %s\n", fifo_path, strerror(errno)); exit(EXIT_FAILURE); |