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

Unified Diff: content/content_tests.gypi

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: content/content_tests.gypi
diff --git a/content/content_tests.gypi b/content/content_tests.gypi
index 01423887562efdc512dda98314aa90478a07a384..5b8143f4bad0c412149b18df81873448314a3c16 100644
--- a/content/content_tests.gypi
+++ b/content/content_tests.gypi
@@ -162,7 +162,7 @@
},
{
'target_name': 'content_unittests',
- 'type': 'executable',
+ 'type': '<(gtest_target_type)',
'defines!': ['CONTENT_IMPLEMENTATION'],
'dependencies': [
'content_browser',
@@ -396,6 +396,11 @@
'browser/geolocation/wifi_data_provider_linux_unittest.cc',
],
}],
+ ['OS=="android" and "<(gtest_target_type)"=="shared_library"', {
+ 'dependencies': [
+ '../testing/android/native_test.gyp:native_test_native_code',
+ ]
+ }],
],
},
{
@@ -536,5 +541,47 @@
}
],
}],
+ # Special target to wrap a <(gtest_target_type)==shared_library
+ # content_unittests 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': 'content_unittests_apk',
+ 'type': 'none',
+ 'dependencies': [
+ 'content_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/libcontent_unittests.so',
+ '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
+ ],
+ 'outputs': [
+ '<(PRODUCT_DIR)/content_unittests_apk/content_unittests-debug.apk',
+ ],
+ 'action': [
+ '../testing/android/generate_native_test.py',
+ '--native_library',
+ '<(PRODUCT_DIR)/lib.target/libcontent_unittests.so',
+ '--jar',
+ '<(PRODUCT_DIR)/lib.java/chromium_base.jar',
+ '--output',
+ '<(PRODUCT_DIR)/content_unittests_apk',
+ '--ant-args',
+ '-DPRODUCT_DIR=<(PRODUCT_DIR)',
+ '--ant-compile'
+ ],
+ },
+ ]
+ },
+ ],
+ }],
],
}

Powered by Google App Engine
This is Rietveld 408576698