diff options
Diffstat (limited to 'Source/WebKit/chromium/WebKitUnitTests.gyp')
| -rw-r--r-- | Source/WebKit/chromium/WebKitUnitTests.gyp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/WebKitUnitTests.gyp b/Source/WebKit/chromium/WebKitUnitTests.gyp index 58af83985..bf68f4f49 100644 --- a/Source/WebKit/chromium/WebKitUnitTests.gyp +++ b/Source/WebKit/chromium/WebKitUnitTests.gyp @@ -113,6 +113,12 @@ }, }, }], + ['OS=="android" and gtest_target_type == "shared_library"', { + 'type': 'shared_library', + 'dependencies': [ + '<(chromium_src_dir)/testing/android/native_test.gyp:native_test_native_code', + ], + }], ], } ], # targets @@ -124,5 +130,50 @@ 'cflags_cc': ['-Wno-c++0x-compat'], }, }], + ['OS=="android" and gtest_target_type == "shared_library"', { + # Wrap libwebkit_unit_tests.so into an android apk for execution. + 'targets': [{ + 'target_name': 'webkit_unit_tests_apk', + 'type': 'none', + 'dependencies': [ + '<(chromium_src_dir)/base/base.gyp:base_java', + 'webkit_unit_tests', + ], + 'variables': { + 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)webkit_unit_tests<(SHARED_LIB_SUFFIX)', + 'input_jars_paths': [ + '<(PRODUCT_DIR)/lib.java/chromium_base.jar', + ], + }, + # Part of the following was copied from <(chromium_src_dir)/build/apk_test.gpyi. + # Not including it because gyp include doesn't support variable in path or under + # conditions. And we also have some different requirements. + 'actions': [{ + 'action_name': 'apk_webkit_unit_tests', + 'message': 'Building webkit_unit_tests test apk.', + 'inputs': [ + '<(chromium_src_dir)/testing/android/AndroidManifest.xml', + '<(chromium_src_dir)/testing/android/generate_native_test.py', + '<(input_shlib_path)', + '<@(input_jars_paths)', + ], + 'outputs': [ + '<(PRODUCT_DIR)/webkit_unit_tests_apk/webkit_unit_tests-debug.apk', + ], + 'action': [ + '<(chromium_src_dir)/testing/android/generate_native_test.py', + '--native_library', + '<(input_shlib_path)', + '--jars', + '"<@(input_jars_paths)"', + '--output', + '<(PRODUCT_DIR)/webkit_unit_tests_apk', + '--ant-args', + '-DPRODUCT_DIR=<(ant_build_out)', + '--ant-compile' + ], + }], + }], + }], ], } |
