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