Index: sync/sync.gyp |
diff --git a/sync/sync.gyp b/sync/sync.gyp |
index 8bb5c2ce61cc648ee501c8e6f88aea2f30063b70..aa19645c47f70265c3039ad03415750fa6d4a6ec 100644 |
--- a/sync/sync.gyp |
+++ b/sync/sync.gyp |
@@ -690,7 +690,7 @@ |
# The unit test executable for sync tests. |
{ |
'target_name': 'sync_unit_tests', |
- 'type': 'executable', |
+ 'type': '<(gtest_target_type)', |
'dependencies': [ |
'../base/base.gyp:run_all_unittests', |
'sync_tests', |
@@ -714,6 +714,11 @@ |
'../chrome/chrome.gyp:browser', |
], |
}], |
+ ['OS == "android" and gtest_target_type == "shared_library"', { |
+ 'dependencies': [ |
+ '../testing/android/native_test.gyp:native_test_native_code', |
+ ], |
+ }], |
], |
}, |
@@ -734,4 +739,26 @@ |
], |
}, |
], |
+ 'conditions': [ |
+ # Special target to wrap a gtest_target_type==shared_library |
+ # sync_unit_tests into an android apk for execution. |
+ ['OS == "android" and gtest_target_type == "shared_library"', { |
+ 'targets': [ |
+ { |
+ 'target_name': 'sync_unit_tests_apk', |
+ 'type': 'none', |
+ 'dependencies': [ |
+ '../base/base.gyp:base_java', |
+ 'sync_unit_tests', |
+ ], |
+ 'variables': { |
+ 'test_suite_name': 'sync_unit_tests', |
+ 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sync_unit_tests<(SHARED_LIB_SUFFIX)', |
+ 'input_jars_paths': [ '<(PRODUCT_DIR)/lib.java/chromium_base.jar', ], |
+ }, |
+ 'includes': [ '../build/apk_test.gypi' ], |
+ }, |
+ ], |
+ }], |
+ ], |
} |