Files
ce_cdm/cdm/cdm_unittests.gyp
2020-07-24 14:30:03 -07:00

118 lines
3.5 KiB
Python

# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine Master License
# Agreement.
#
# Builds under the CDM ./build.py (target platform) build system
# Refer to the distribution package's README for details.
{
'includes': [
'platform_properties.gypi',
],
'variables': {
# Directory where OEMCrypto header, test, and reference files lives.
'oemcrypto_dir': '../oemcrypto',
# Directory where widevine utilities live.
'util_dir': '../util',
'metrics_target': 'cdm.gyp:metrics_proto',
'device_files_target': 'cdm.gyp:device_files',
},
'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',
],
},
},
'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',
],
}],
],
}],
['oemcrypto_lib=="target"', {
'dependencies': [
'<(oemcrypto_gyp_target)',
],
}],
],
},
{
'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'
],
},
],
}