blob: 1984af065bbdc1331ba8d92a8a428471a80f13d9 [file]
load("@rules_cc//cc:cc_test.bzl", "cc_test")
package(default_visibility = ["//visibility:public"])
TEST_COPTS = [
"-std=c++23",
"-DHAVE_USB",
"-DHAVE_SPI",
"-DOMIT_VARIABLE_ARRAYS",
"-Wno-pedantic",
"-I$(BINDIR)/external/hothd+",
"-I$(BINDIR)/external/hothd",
"-I$(BINDIR)",
"-Iexternal/hothd+",
"-Iexternal/hothd",
"-I.",
]
TEST_DEPS = [
"//:libhothd",
"@googletest//:gtest",
"@googletest//:gtest_main",
]
TEST_HDRS = glob(["*.hpp"])
cc_test(
name = "firmware_mtd_updater_unittest",
srcs = ["firmware_mtd_updater_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "firmware_spi_updater_unittest",
srcs = ["firmware_spi_updater_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "message_file_unittest",
srcs = ["message_file_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "message_reinit_unittest",
srcs = ["message_reinit_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "message_util_unittest",
srcs = ["message_util_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "mtd_util_unittest",
srcs = ["mtd_util_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "host_command_unittest",
srcs = ["host_command_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "payload_update_unittest",
srcs = ["payload_update_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "ec_util_unittest",
srcs = ["ec_util_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "hoth_unittest",
srcs = ["hoth_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "hoth_state_unittest",
srcs = ["hoth_state_unittest.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)
cc_test(
name = "log_collector_util_test",
srcs = ["log_collector_util_test.cpp"] + TEST_HDRS,
copts = TEST_COPTS,
includes = ["."],
deps = TEST_DEPS,
)