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

Unified Diff: ipc/ipc.gyp

Issue 10051021: apk-based test runner work for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/common.gypi ('k') | media/base/android/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc.gyp
diff --git a/ipc/ipc.gyp b/ipc/ipc.gyp
index 9b38f77aaf2fcf0d28820cb9d53b8d4a93d5e07b..1c9d552875f1f6c235743bbc54636c49730b7be9 100644
--- a/ipc/ipc.gyp
+++ b/ipc/ipc.gyp
@@ -32,7 +32,7 @@
'targets': [
{
'target_name': 'ipc_tests',
- 'type': 'executable',
+ 'type': '<(gtest_target_type)',
'dependencies': [
'ipc',
'../base/base.gyp:base',
@@ -63,6 +63,11 @@
'../build/linux/system.gyp:gtk',
],
}],
+ ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
+ 'dependencies': [
+ '../testing/android/native_test.gyp:native_test_native_code',
+ ],
+ }],
['os_posix == 1 and OS != "mac" and OS != "android"', {
'conditions': [
['linux_use_tcmalloc==1', {
@@ -87,4 +92,48 @@
],
},
],
+ 'conditions': [
+ # Special target to wrap a <(gtest_target_type)==shared_library
+ # ipc_tests into an android apk for execution.
+ # See base.gyp for TODO(jrg)s about this strategy.
+ ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
+ 'targets': [
+ {
+ 'target_name': 'ipc_tests_apk',
+ 'type': 'none',
+ 'dependencies': [
+ 'ipc_tests',
+ ],
+ 'actions': [
+ {
+ # Generate apk files (including source and antfile) from
+ # a template, and builds them.
+ 'action_name': 'generate_and_build',
+ 'inputs': [
+ '../testing/android/generate_native_test.py',
+ '<(PRODUCT_DIR)/lib.target/libipc_tests.so',
+ '<(PRODUCT_DIR)/chromium_base.jar'
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/ChromeNativeTests_ipc_tests-debug.apk',
+ ],
+ 'action': [
+ '../testing/android/generate_native_test.py',
+ '--native_library',
+ '<(PRODUCT_DIR)/lib.target/libipc_tests.so',
+ # TODO(jrg): find a better way to specify jar
+ # dependencies. Hard coding seems fragile.
+ '--jar',
+ '<(PRODUCT_DIR)/chromium_base.jar',
+ '--output',
+ '<(PRODUCT_DIR)/ipc_tests_apk',
+ '--ant-args',
+ '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '--ant-compile'
+ ],
+ },
+ ],
+ }],
+ }],
+ ],
}
« no previous file with comments | « build/common.gypi ('k') | media/base/android/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698