Index: cc/cc_tests.gyp |
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp |
index 8b724e7d49138a8002dbdf4d693d3021d1013333..143ed523d3b2d42c7e2919905b71def33cae9e2f 100644 |
--- a/cc/cc_tests.gyp |
+++ b/cc/cc_tests.gyp |
@@ -86,7 +86,7 @@ |
'targets': [ |
{ |
'target_name': 'cc_unittests', |
- 'type': 'executable', |
+ 'type': '<(gtest_target_type)', |
'dependencies': [ |
'../base/base.gyp:test_support_base', |
'../testing/gtest.gyp:gtest', |
@@ -117,10 +117,33 @@ |
'<@(cc_tests_source_files)', |
], |
}], |
+ ['OS == "android" and gtest_target_type == "shared_library"', { |
+ 'dependencies': [ |
+ '../testing/android/native_test.gyp:native_test_native_code', |
+ ], |
+ }], |
], |
}, |
], |
'conditions': [ |
+ # Special target to wrap a gtest_target_type==shared_library |
+ # cc_unittests into an android apk for execution. |
+ ['OS == "android" and gtest_target_type == "shared_library"', { |
+ 'targets': [ |
+ { |
+ 'target_name': 'cc_unittests_apk', |
+ 'type': 'none', |
+ 'dependencies': [ |
+ 'cc_unittests', |
+ ], |
+ 'variables': { |
+ 'test_suite_name': 'cc_unittests', |
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)cc_unittests<(SHARED_LIB_SUFFIX)', |
+ }, |
+ 'includes': [ '../build/apk_test.gypi' ], |
+ }, |
+ ], |
+ }], |
['use_libcc_for_compositor==1', { |
'targets': [ |
{ |