Source release 17.1.0
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
|
||||
# source code may only be used and distributed under the Widevine Master License
|
||||
# source code may only be used and distributed under the Widevine License
|
||||
# Agreement.
|
||||
#
|
||||
# Builds under the CDM ./build.py (target platform) build system
|
||||
# Refer to the distribution package's README for details.
|
||||
# Any top-level targets in this file (and their dependencies) will be built by
|
||||
# the CE CDM's ./build.py build system. Refer to the distribution package's
|
||||
# README for details.
|
||||
{
|
||||
'includes': [
|
||||
'platform_properties.gypi',
|
||||
@@ -15,103 +16,262 @@
|
||||
'util_dir': '../util',
|
||||
'metrics_target': 'cdm.gyp:metrics_proto',
|
||||
'device_files_target': 'cdm.gyp:device_files',
|
||||
# The path to the test device cert source file.
|
||||
'device_cert_path%': 'test/device_cert.cpp',
|
||||
# The path to the prebuilt CDM to test against. (iOS only)
|
||||
'prebuilt_cdm_path%': '',
|
||||
'prebuilt_cdm_cert%': '',
|
||||
'supports_dynamic_perf_test%': 0,
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'widevine_ce_cdm_unittest',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
# The test runner and the testing device certificate.
|
||||
'test/cdm_test_main.cpp',
|
||||
'test/device_cert.cpp',
|
||||
'test/device_cert.h',
|
||||
# The test host, which is required for all test suites on CE.
|
||||
'test/test_host.cpp',
|
||||
'test/test_host.h',
|
||||
'../util/test/test_sleep.cpp',
|
||||
],
|
||||
'includes': [
|
||||
'../oemcrypto/test/oemcrypto_unittests.gypi',
|
||||
'../oemcrypto/odk/src/kdo.gypi',
|
||||
'cdm_unittests.gypi',
|
||||
'core_unittests.gypi',
|
||||
'util_unittests.gypi',
|
||||
],
|
||||
'dependencies': [
|
||||
'cdm.gyp:widevine_ce_cdm_static',
|
||||
'../third_party/gmock.gyp:gmock',
|
||||
'../third_party/gmock.gyp:gtest',
|
||||
],
|
||||
'defines': [
|
||||
# The methods in util/ are marked as dllimport but in this case are
|
||||
# being loaded in the static library. So define this so Windows
|
||||
# doesn't look in a DLL for the implementations.
|
||||
'CORE_UTIL_IMPLEMENTATION',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
# Additionally, since they are loaded locally, suppress these
|
||||
# warnings.
|
||||
'AdditionalOptions': [
|
||||
'/IGNORE:4049',
|
||||
'/IGNORE:4217',
|
||||
],
|
||||
},
|
||||
'targets': [{
|
||||
'toolsets' : [ 'target' ],
|
||||
'target_name': 'widevine_ce_cdm_unittest',
|
||||
'sources': [
|
||||
'test/cdm_test_main.cpp',
|
||||
'test/cdm_test_runner.cpp',
|
||||
'test/create_test_file_system.cpp',
|
||||
'<(device_cert_path)',
|
||||
'test/device_cert.h',
|
||||
# The test host, which is required for all test suites on CE.
|
||||
'test/test_host.cpp',
|
||||
'test/test_host.h',
|
||||
'../util/test/test_sleep.cpp',
|
||||
],
|
||||
'includes': [
|
||||
'../oemcrypto/test/oemcrypto_unittests.gypi',
|
||||
'../oemcrypto/odk/src/kdo.gypi',
|
||||
'../oemcrypto/odk/test/odk_test.gypi',
|
||||
'../oemcrypto/util/oec_ref_util_unittests.gypi',
|
||||
'cdm_unittests.gypi',
|
||||
'core_unittests.gypi',
|
||||
'util_unittests.gypi',
|
||||
],
|
||||
'dependencies': [
|
||||
'cdm.gyp:widevine_ce_cdm_static',
|
||||
'../oemcrypto/util/oec_ref_util.gyp:oec_ref_util',
|
||||
'../third_party/googletest.gyp:gmock',
|
||||
'../third_party/googletest.gyp:gtest',
|
||||
],
|
||||
'defines': [
|
||||
# The methods in util/ are marked as dllimport but in this case are
|
||||
# being loaded in the static library. So define this so Windows
|
||||
# doesn't look in a DLL for the implementations.
|
||||
'CORE_UTIL_IMPLEMENTATION',
|
||||
],
|
||||
'msvs_settings': {
|
||||
'VCLinkerTool': {
|
||||
# Additionally, since they are loaded locally, suppress these
|
||||
# warnings.
|
||||
'AdditionalOptions': [
|
||||
'/IGNORE:4049',
|
||||
'/IGNORE:4217',
|
||||
],
|
||||
},
|
||||
'conditions': [
|
||||
['oemcrypto_lib=="ref"', {
|
||||
'dependencies': [
|
||||
'oec_ref',
|
||||
],
|
||||
}],
|
||||
# TODO(b/139814713): For testing and internal use only.
|
||||
['oemcrypto_adapter_type=="static_v15"', {
|
||||
'defines': [
|
||||
# This is used by the unit tests to use some v15 functions.
|
||||
'TEST_OEMCRYPTO_V15',
|
||||
],
|
||||
}],
|
||||
['oemcrypto_lib=="level3"', {
|
||||
'sources': [
|
||||
# The test impl of OEMCrypto_Level3FileSystem and its factory.
|
||||
'test/level3_file_system_ce_test.h',
|
||||
'test/level3_file_system_ce_test.cpp',
|
||||
'test/level3_file_system_ce_test_factory.cpp',
|
||||
],
|
||||
'conditions': [
|
||||
['oemcrypto_adapter_type=="dynamic" ', {
|
||||
'dependencies': [
|
||||
'../oemcrypto/level3/oec_level3.gyp:oec_level3_dynamic',
|
||||
],
|
||||
}, {
|
||||
'dependencies': [
|
||||
'../oemcrypto/level3/oec_level3.gyp:oec_level3_static',
|
||||
},
|
||||
'conditions': [
|
||||
['OS=="ios"', {
|
||||
'type': 'loadable_module',
|
||||
'mac_xctest_bundle': '1',
|
||||
'defines': [
|
||||
'GTEST_FILTER="<(gtest_filter)"',
|
||||
],
|
||||
'dependencies': [
|
||||
'dummy_app',
|
||||
],
|
||||
'sources': [
|
||||
'test/gtest_xctest_wrapper.mm',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'BUNDLE_LOADER': '$(TEST_HOST)',
|
||||
'INFOPLIST_FILE': 'test/info.plist',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'EQHXZ8M8AV.widevine_ce_cdm_unittest',
|
||||
'TEST_HOST': '<(PRODUCT_DIR)/dummy_app.app/dummy_app',
|
||||
'WRAPPER_EXTENSION': 'xctest',
|
||||
},
|
||||
}, {
|
||||
'type': 'executable',
|
||||
}],
|
||||
['oemcrypto_lib=="ref"', {
|
||||
'dependencies': [
|
||||
'oemcrypto_reference_implementation.gyp:oec_ref',
|
||||
],
|
||||
}],
|
||||
# TODO(b/139814713): For testing and internal use only.
|
||||
['oemcrypto_adapter_type=="static_v15"', {
|
||||
'defines': [
|
||||
# This is used by the unit tests to use some v15 functions.
|
||||
'TEST_OEMCRYPTO_V15',
|
||||
],
|
||||
}],
|
||||
['oemcrypto_lib=="level3"', {
|
||||
'sources': [
|
||||
# The test impl of OEMCrypto_Level3FileSystem and its factory.
|
||||
'test/level3_file_system_ce_test.h',
|
||||
'test/level3_file_system_ce_test.cpp',
|
||||
'test/level3_file_system_ce_test_factory.cpp',
|
||||
],
|
||||
'conditions': [
|
||||
['oemcrypto_adapter_type=="dynamic" ', {
|
||||
'dependencies': [
|
||||
'../oemcrypto/level3/oec_level3.gyp:oec_level3_dynamic',
|
||||
],
|
||||
}, {
|
||||
'dependencies': [
|
||||
'../oemcrypto/level3/oec_level3.gyp:oec_level3_static',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['oemcrypto_lib=="target"', {
|
||||
'dependencies': [
|
||||
'<(oemcrypto_gyp_target)',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
'conditions': [
|
||||
['supports_dynamic_perf_test', {
|
||||
'targets': [{
|
||||
'target_name': 'widevine_perf_test_dynamic',
|
||||
'type': 'executable',
|
||||
'sources': [
|
||||
'<(device_cert_path)',
|
||||
'../core/test/config_test_env.cpp',
|
||||
'../core/test/http_socket.cpp',
|
||||
'../core/test/license_request.cpp',
|
||||
'../core/test/url_request.cpp',
|
||||
'../util/src/string_conversions.cpp',
|
||||
'../util/test/test_sleep.cpp',
|
||||
'src/log.cpp',
|
||||
'test/perf_test.cpp',
|
||||
'test/perf_test_dynamic.cpp',
|
||||
'test/test_host.cpp',
|
||||
],
|
||||
'includes': [ '../util/libssl_dependency.gypi' ],
|
||||
'include_dirs': [
|
||||
'../core/include',
|
||||
'../core/test',
|
||||
'../util/include',
|
||||
'../util/test',
|
||||
'include',
|
||||
],
|
||||
'dependencies': [
|
||||
'../third_party/googletest.gyp:gmock',
|
||||
'../third_party/googletest.gyp:gtest',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="linux"', {
|
||||
'libraries': [ '-ldl' ],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
}], # condition: supports_dynamic_perf_test
|
||||
['OS=="ios"', {
|
||||
'targets': [{
|
||||
'toolsets' : [ 'target' ],
|
||||
'target_name': 'dummy_app',
|
||||
'type': 'executable',
|
||||
'mac_bundle': '1',
|
||||
'sources': [
|
||||
'test/dummy_app.mm',
|
||||
],
|
||||
'libraries': [
|
||||
'CoreFoundation.framework',
|
||||
'UIKit.framework',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'INFOPLIST_FILE': 'test/info.plist',
|
||||
},
|
||||
'conditions': [
|
||||
['prebuilt_cdm_path!=""', {
|
||||
'copies': [{
|
||||
'destination': '<(PRODUCT_DIR)/dummy_app.app/Frameworks',
|
||||
'xcode_code_sign': 1,
|
||||
'files': [
|
||||
# GYP seems to always use relative paths here, even if they
|
||||
# start with '/'.
|
||||
'<!(realpath --relative-to=. "<(prebuilt_cdm_path)")',
|
||||
],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
['oemcrypto_lib=="target"', {
|
||||
'dependencies': [
|
||||
'<(oemcrypto_gyp_target)',
|
||||
],
|
||||
}],
|
||||
}],
|
||||
],
|
||||
}],
|
||||
'conditions': [
|
||||
['supports_dynamic_perf_test', {
|
||||
'targets': [{
|
||||
'target_name': 'create_cert_cc',
|
||||
'type': 'none',
|
||||
'actions': [{
|
||||
'action_name': 'gen_cert',
|
||||
'message': 'Generating device_cert.cc',
|
||||
'msvs_cygwin_shell': 0,
|
||||
'inputs': [
|
||||
'create_cert_cc.py',
|
||||
'<(prebuilt_cdm_cert)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(INTERMEDIATE_DIR)/cert.cc',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'create_cert_cc.py',
|
||||
'<(prebuilt_cdm_cert)',
|
||||
'<(INTERMEDIATE_DIR)/cert.cc',
|
||||
],
|
||||
}],
|
||||
}, {
|
||||
'target_name': 'widevine_perf_test_xctest',
|
||||
'type': 'loadable_module',
|
||||
'mac_xctest_bundle': '1',
|
||||
'defines': [
|
||||
'GTEST_FILTER="<(gtest_filter)"',
|
||||
],
|
||||
'xcode_settings': {
|
||||
'BUNDLE_LOADER': '$(TEST_HOST)',
|
||||
'INFOPLIST_FILE': 'test/info.plist',
|
||||
'PRODUCT_BUNDLE_IDENTIFIER': 'EQHXZ8M8AV.widevine_perf_test_xctest',
|
||||
'TEST_HOST': '<(PRODUCT_DIR)/dummy_app.app/dummy_app',
|
||||
'WRAPPER_EXTENSION': 'xctest',
|
||||
|
||||
'OTHER_LDFLAGS': [
|
||||
'-iframework',
|
||||
'<(prebuilt_cdm_path)/..',
|
||||
],
|
||||
},
|
||||
'libraries': [
|
||||
'<(prebuilt_cdm_path)',
|
||||
],
|
||||
'sources': [
|
||||
'<(INTERMEDIATE_DIR)/cert.cc',
|
||||
'../core/test/config_test_env.cpp',
|
||||
'../core/test/http_socket.cpp',
|
||||
'../core/test/license_request.cpp',
|
||||
'../core/test/url_request.cpp',
|
||||
'../util/src/string_conversions.cpp',
|
||||
'../util/test/test_clock.cpp',
|
||||
'../util/test/test_sleep.cpp',
|
||||
'src/log.cpp',
|
||||
'test/perf_test.cpp',
|
||||
'test/perf_test_xctest.mm',
|
||||
'test/test_host.cpp',
|
||||
],
|
||||
'includes': [ '../util/libssl_dependency.gypi' ],
|
||||
'include_dirs': [
|
||||
'../core/include',
|
||||
'../core/test',
|
||||
'../util/include',
|
||||
'../util/test',
|
||||
'include',
|
||||
],
|
||||
'dependencies': [
|
||||
'../third_party/googletest.gyp:gmock',
|
||||
'../third_party/googletest.gyp:gtest',
|
||||
'create_cert_cc',
|
||||
'dummy_app',
|
||||
],
|
||||
}],
|
||||
}], # condition: supports_dynamic_perf_test
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'oec_ref',
|
||||
'type': 'static_library',
|
||||
'standalone_static_library': 1,
|
||||
'hard_dependency': 1,
|
||||
'includes': [
|
||||
'../oemcrypto/ref/oec_ref.gypi',
|
||||
],
|
||||
},
|
||||
{
|
||||
'target_name': 'oec_ref_shared',
|
||||
'type': 'shared_library',
|
||||
'dependencies': [
|
||||
'oec_ref'
|
||||
],
|
||||
},
|
||||
}], # condition: OS=="ios"
|
||||
],
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user