# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary # source code may only be used and distributed under the Widevine License # Agreement. # # 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', ], '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': [{ 'toolsets' : [ 'target' ], 'target_name': 'widevine_ce_cdm_reboot_tests', 'sources': [ 'test/cdm_reboot_test_main.cpp', 'test/cdm_test_runner.cpp', 'test/create_test_file_system.cpp', 'test/test_host.cpp', 'test/test_host.h', '../core/test/config_test_env.cpp', '../core/test/fake_provisioning_server.cpp', '../core/test/http_socket.cpp', '../core/test/license_holder.cpp', '../core/test/license_request.cpp', '../core/test/message_dumper.cpp', '../core/test/provisioning_holder.cpp', '../core/test/reboot_test.cpp', '../core/test/test_base.cpp', '../core/test/test_printers.cpp', '../core/test/url_request.cpp', '../oemcrypto/test/oec_key_deriver.cpp', '../oemcrypto/test/oec_device_features.cpp', '../util/test/test_sleep.cpp', ], 'includes': [ '../oemcrypto/odk/src/kdo.gypi', '../util/libssl_dependency.gypi', ], 'include_dirs': [ '../cdm/include', '../core/include', '../core/test', '../metrics/include', '../oemcrypto/test', '../oemcrypto/include', '../util/include', '../util/test', ], 'dependencies': [ 'cdm.gyp:widevine_ce_cdm_static', '../oemcrypto/odk/src/odk.gyp:odk', '../third_party/googletest.gyp:gmock', '../third_party/googletest.gyp:gtest', '<(metrics_target)', '<(device_files_target)', ], 'defines': [ 'UNIT_TEST', 'CDM_TESTS', ], 'msvs_settings': { 'VCLinkerTool': { # Additionally, since they are loaded locally, suppress these # warnings. 'AdditionalOptions': [ '/IGNORE:4049', '/IGNORE:4217', ], }, }, 'conditions': [ ['OS=="ios"', { 'type': 'loadable_module', 'mac_xctest_bundle': '1', 'defines': [ 'GTEST_FILTER="<(gtest_filter)"', ], 'dependencies': [ 'cdm_unittests.gyp:dummy_app', ], 'sources': [ 'test/gtest_xctest_wrapper.mm', ], 'xcode_settings': { 'BUNDLE_LOADER': '$(TEST_HOST)', 'TEST_HOST': '<(PRODUCT_DIR)/dummy_app.app/dummy_app', 'WRAPPER_EXTENSION': 'xctest', }, }, { 'type': 'executable', }], ['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_path)', ], }], ], }], }