1COPTS = [ 2 "-std=c++11", 3 "-g", 4 "-Wall", 5 "-Wextra", 6] 7 8cc_binary( 9 name = "runtests", 10 srcs = [ 11 "src/aes-cmac-tests.cc", 12 "src/gtest_with_gflags_main.cc", 13 "src/keymaster-import-key-tests.cc", 14 "src/keymaster-import-wrapped-key-tests.cc", 15 "src/keymaster-provision-tests.cc", 16 "src/nugget_core_tests.cc", 17 "src/runtests.cc", 18 "src/weaver_tests.cc", 19 "src/avb_tests.cc", 20 ], 21 copts = COPTS, 22 deps = [ 23 ":dcrypto_test_data", 24 ":km_test_lib", 25 ":util", 26 "@boringssl//:ssl", 27 "@com_github_gflags_gflags//:gflags", 28 "@gtest//:gtest", 29 "@nugget_core_nugget//:config_chip", 30 "@nugget_host_generic_libnos//:libnos", 31 "@nugget_host_generic_nugget_proto//:keymaster_client_proto", 32 "@nugget_host_generic_nugget_proto//:nugget_app_keymaster_keymaster_cc_proto", 33 "@nugget_host_generic_nugget_proto//:nugget_app_weaver_weaver_cc_proto", 34 "@nugget_host_generic_nugget_proto//:nugget_app_avb_avb_cc_proto", 35 "@nugget_host_generic_nugget_proto//:weaver_client_proto", 36 "@nugget_host_generic_nugget_proto//:avb_client_proto", 37 "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram", 38 "@nugget_test_systemtestharness_tools//:nugget_tools", 39 ], 40) 41 42cc_binary( 43 name = "stress_test", 44 srcs = [ 45 "src/stress_test.cc", 46 ], 47 copts = COPTS, 48 deps = [ 49 ":util", 50 "@com_google_protobuf//:protobuf", 51 "@nugget_core_nugget//:config_chip", 52 "@nugget_host_generic_libnos//:libnos", 53 "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram", 54 "@nugget_test_systemtestharness_tools//:nugget_tools", 55 ], 56) 57 58cc_binary( 59 name = "cavptests", 60 srcs = [ 61 "src/cavptests.cc", 62 "src/gtest_with_gflags_main.cc", 63 "src/test-data/NIST-CAVP/aes-gcm-cavp.h", 64 ], 65 copts = COPTS, 66 includes = [ 67 "src/test-data/NIST-CAVP", 68 ], 69 deps = [ 70 ":util", 71 "@com_github_gflags_gflags//:gflags", 72 "@gtest//:gtest", 73 "@nugget_host_generic_libnos//:libnos", 74 "@nugget_host_linux_citadel_libnos_datagram//:libnos_datagram", 75 ], 76) 77 78cc_library( 79 name = "util", 80 srcs = [ 81 "src/util.cc", 82 ], 83 hdrs = [ 84 "src/blob.h", 85 "src/macros.h", 86 "src/util.h", 87 ], 88 copts = COPTS, 89 deps = [ 90 "@com_github_gflags_gflags//:gflags", 91 "@nugget_host_generic_nugget_proto//:nugget_app_protoapi_control_cc_proto", 92 "@nugget_host_generic_nugget_proto//:nugget_app_protoapi_testing_api_cc_proto", 93 "@nugget_test_systemtestharness_tools//:nugget_tools", 94 "@nugget_thirdparty_ahdlc//:ahdlc", 95 ], 96) 97 98cc_library( 99 name = "km_test_lib", 100 srcs = [ 101 "src/test-data/test-keys/rsa.cc", 102 ], 103 hdrs = [ 104 "src/test-data/test-keys/rsa.h", 105 ], 106) 107 108cc_library( 109 name = "dcrypto_test_data", 110 srcs = [], 111 hdrs = [ 112 "src/test-data/dcrypto/aes-cmac-rfc4493.h", 113 ], 114) 115