2020-03-12 20:20:54 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
|
|
|
2018-01-18 23:14:50 +08:00
|
|
|
cc_library(
|
2018-07-17 06:46:02 +08:00
|
|
|
name = "check_compat",
|
2018-01-18 23:14:50 +08:00
|
|
|
testonly = True,
|
2018-07-17 06:46:02 +08:00
|
|
|
hdrs = ["check_compat.h"],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_library(
|
|
|
|
name = "run_auto_test",
|
|
|
|
testonly = True,
|
|
|
|
hdrs = ["run_auto_test.h"],
|
2018-01-18 23:14:50 +08:00
|
|
|
)
|
|
|
|
|
2018-07-06 18:39:57 +08:00
|
|
|
test_sizes = {
|
|
|
|
"conference_peer_nick_test": "medium",
|
|
|
|
}
|
|
|
|
|
2019-11-17 08:24:02 +08:00
|
|
|
flaky_tests = {
|
|
|
|
"crypto_core_test": True,
|
|
|
|
"lan_discovery_test": True,
|
|
|
|
"tcp_relay_test": True,
|
|
|
|
}
|
|
|
|
|
2018-01-18 23:14:50 +08:00
|
|
|
[cc_test(
|
|
|
|
name = src[:-2],
|
2018-07-20 20:56:52 +08:00
|
|
|
size = test_sizes.get(
|
|
|
|
src[:-2],
|
|
|
|
"small",
|
|
|
|
),
|
2018-01-18 23:14:50 +08:00
|
|
|
srcs = [src],
|
2018-08-20 05:17:13 +08:00
|
|
|
args = ["$(location %s)" % src],
|
2018-02-23 10:22:38 +08:00
|
|
|
copts = ["-Wno-sign-compare"],
|
2018-08-20 05:17:13 +08:00
|
|
|
data = glob(["data/*"]),
|
2020-03-01 00:01:08 +08:00
|
|
|
flaky = flaky_tests.get(
|
|
|
|
src[:-2],
|
|
|
|
False,
|
|
|
|
),
|
2018-01-18 23:14:50 +08:00
|
|
|
deps = [
|
2018-07-17 06:46:02 +08:00
|
|
|
":check_compat",
|
|
|
|
":run_auto_test",
|
2018-01-18 23:14:50 +08:00
|
|
|
"//c-toxcore/testing:misc_tools",
|
|
|
|
"//c-toxcore/toxav",
|
|
|
|
"//c-toxcore/toxcore",
|
2018-07-17 09:18:04 +08:00
|
|
|
"//c-toxcore/toxcore:DHT_srcs",
|
2018-01-22 00:58:32 +08:00
|
|
|
"//c-toxcore/toxencryptsave",
|
2018-01-18 23:14:50 +08:00
|
|
|
],
|
2020-03-01 00:01:08 +08:00
|
|
|
) for src in glob(
|
|
|
|
["*_test.c"],
|
|
|
|
# TODO(iphydf): Fix this test and re-enable it.
|
|
|
|
exclude = ["tcp_relay_test.c"],
|
|
|
|
)]
|