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

Unified Diff: net/net.gyp

Issue 10399126: Add APK targets for content_unittests and net_unittests. (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
Index: net/net.gyp
diff --git a/net/net.gyp b/net/net.gyp
index 7bf527f5476fc943ced476d09d3c085baf502ef8..b5e9e7d68141d3a6ce2d522e859aaf547e8ce3e0 100644
--- a/net/net.gyp
+++ b/net/net.gyp
@@ -1030,7 +1030,7 @@
},
{
'target_name': 'net_unittests',
- 'type': 'executable',
+ 'type': '<(gtest_target_type)',
'dependencies': [
'net',
'net_test_support',
@@ -1367,6 +1367,11 @@
],
},
],
+ ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
+ 'dependencies': [
+ '../testing/android/native_test.gyp:native_test_native_code',
+ ]
+ }],
[ 'OS != "win" and OS != "mac"', {
'sources!': [
'base/x509_cert_types_unittest.cc',
@@ -1840,6 +1845,48 @@
},
],
}],
+ # Special target to wrap a <(gtest_target_type)==shared_library
+ # net_unittests into an android apk for execution.
Yaron 2012/05/22 17:35:55 So can we templatize these now like in build/java.
nilesh 2012/05/22 21:01:02 Done. Thanks, this is much cleaner now.
+ # See base.gyp for TODO(jrg)s about this strategy.
+ ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
+ 'targets': [
+ {
+ 'target_name': 'net_unittests_apk',
+ 'type': 'none',
+ 'dependencies': [
+ 'net_unittests',
+ ],
+ 'actions': [
+ {
+ # Generate apk files (including source and antfile) from
+ # a template, and builds them.
+ 'action_name': 'generate_and_build',
+ 'inputs': [
+ '../testing/android/AndroidManifest.xml',
+ '../testing/android/generate_native_test.py',
+ '<(PRODUCT_DIR)/lib.target/libnet_unittests.so',
+ '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/net_unittests_apk/net_unittests-debug.apk',
+ ],
+ 'action': [
+ '../testing/android/generate_native_test.py',
+ '--native_library',
+ '<(PRODUCT_DIR)/lib.target/libnet_unittests.so',
+ '--jar',
+ '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
+ '--output',
+ '<(PRODUCT_DIR)/net_unittests_apk',
+ '--ant-args',
+ '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '--ant-compile'
+ ],
+ },
+ ]
+ },
+ ],
+ }],
['OS=="win"', {
'targets': [
{
« build/android/gtest_filter/content_unittests_disabled ('K') | « content/content_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698