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

Side by Side Diff: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java

Issue 10957036: Android: creates fifo for test runners in internal directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/android/pylib/test_package_apk.py ('k') | testing/android/native_test_launcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.native_test; 5 package org.chromium.native_test;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.os.Environment; 10 import android.os.Environment;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 } catch (UnsatisfiedLinkError e) { 64 } catch (UnsatisfiedLinkError e) {
65 Log.e(TAG, "Unable to load lib" + mLibrary + ".so: " + e); 65 Log.e(TAG, "Unable to load lib" + mLibrary + ".so: " + e);
66 nativeTestFailed(); 66 nativeTestFailed();
67 throw e; 67 throw e;
68 } 68 }
69 } 69 }
70 70
71 private void runTests() { 71 private void runTests() {
72 // This directory is used by build/android/pylib/test_package_apk.py. 72 // This directory is used by build/android/pylib/test_package_apk.py.
73 File filesDir = new File(Environment.getExternalStorageDirectory(), 73 nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext()) ;
74 "native_tests/");
75 filesDir.mkdirs();
76 nativeRunTests(filesDir.getAbsolutePath(), getApplicationContext());
77 } 74 }
78 75
79 // Signal a failure of the native test loader to python scripts 76 // Signal a failure of the native test loader to python scripts
80 // which run tests. For example, we look for 77 // which run tests. For example, we look for
81 // RUNNER_FAILED build/android/test_package.py. 78 // RUNNER_FAILED build/android/test_package.py.
82 private void nativeTestFailed() { 79 private void nativeTestFailed() {
83 Log.e(TAG, "[ RUNNER_FAILED ] could not load native library"); 80 Log.e(TAG, "[ RUNNER_FAILED ] could not load native library");
84 } 81 }
85 82
86 private void loadLibrary() throws UnsatisfiedLinkError { 83 private void loadLibrary() throws UnsatisfiedLinkError {
87 Log.i(TAG, "loading: " + mLibrary); 84 Log.i(TAG, "loading: " + mLibrary);
88 System.loadLibrary(mLibrary); 85 System.loadLibrary(mLibrary);
89 Log.i(TAG, "loaded: " + mLibrary); 86 Log.i(TAG, "loaded: " + mLibrary);
90 } 87 }
91 88
92 private native void nativeRunTests(String filesDir, Context appContext); 89 private native void nativeRunTests(String filesDir, Context appContext);
93 } 90 }
OLDNEW
« no previous file with comments | « build/android/pylib/test_package_apk.py ('k') | testing/android/native_test_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698