Files
ce_cdm/oemcrypto/test/oemcrypto_unittests.gypi
2024-11-27 00:07:23 +00:00

82 lines
2.2 KiB
Python

# Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
# source code may only be used and distributed under the Widevine License
# Agreement.
#
# Include this in any custom unit test targets.
# Does not include the test runner main.
{
'variables': {
'test_opk_serialization_version%' : 'false',
'static_libcpp%' : 'false',
},
'sources': [
'GEN_api_lock_file.c',
'oec_device_features.cpp',
'oec_decrypt_fallback_chain.cpp',
'oec_key_deriver.cpp',
'oec_session_util.cpp',
'oemcrypto_corpus_generator_helper.cpp',
'oemcrypto_session_tests_helper.cpp',
'oemcrypto_basic_test.cpp',
'oemcrypto_cast_test.cpp',
'oemcrypto_decrypt_test.cpp',
'oemcrypto_generic_crypto_test.cpp',
'oemcrypto_license_test.cpp',
'oemcrypto_provisioning_test.cpp',
'oemcrypto_security_test.cpp',
'oemcrypto_usage_table_test.cpp',
'oemcrypto_test.cpp',
'<(jsmn_dir)/jsmn.c',
],
'conditions': [
['test_opk_serialization_version=="true"', {
'sources+' : [
'oemcrypto_serialization_version_test.cpp',
],
}],
['static_libcpp=="true"', {
'ldflags+':[
'-static-libstdc++',
],
}],
],
'include_dirs': [
'<(util_dir)/include',
'<(util_dir)/test',
'<(oemcrypto_dir)/include',
'<(oemcrypto_dir)/ref/src',
'<(oemcrypto_dir)/test',
'<(oemcrypto_dir)/test/fuzz_tests',
'<(oemcrypto_dir)/odk/include',
'<(oemcrypto_dir)/util/include',
'<(json_dir)/single_include',
'<(jsmn_dir)',
],
'defines': [
'OEMCRYPTO_TESTS',
],
'conditions': [
['support_ota_keybox_functions=="true"', {
'sources': [
'<(oemcrypto_dir)/test/ota_keybox_test.cpp',
],
}],
['generate_code_coverage_report=="true"', {
# Include flags to generate source based code coverage reports.
'cflags': [
'-fprofile-instr-generate',
'-fcoverage-mapping',
],
'ldflags': [
'-fprofile-instr-generate',
'-fcoverage-mapping',
],
}],
],
'dependencies': [
'<(oemcrypto_dir)/odk/src/odk.gyp:odk',
'<(oemcrypto_dir)/util/oec_ref_util.gyp:oec_ref_util',
],
'includes': [ '../../util/libssl_dependency.gypi' ],
}