2020-03-12 20:20:54 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
|
|
|
|
|
2022-01-12 05:28:53 +08:00
|
|
|
package(features = ["layering_check"])
|
|
|
|
|
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
|
|
|
)
|
|
|
|
|
2019-11-17 08:24:02 +08:00
|
|
|
flaky_tests = {
|
|
|
|
"crypto_core_test": True,
|
|
|
|
"lan_discovery_test": True,
|
2021-12-15 18:58:12 +08:00
|
|
|
"save_load_test": True,
|
|
|
|
"tox_many_tcp_test": True,
|
2019-11-17 08:24:02 +08:00
|
|
|
}
|
|
|
|
|
2018-01-18 23:14:50 +08:00
|
|
|
[cc_test(
|
|
|
|
name = src[:-2],
|
2020-03-27 18:27:03 +08:00
|
|
|
size = "small",
|
2018-01-18 23:14:50 +08:00
|
|
|
srcs = [src],
|
2018-08-20 05:17:13 +08:00
|
|
|
args = ["$(location %s)" % src],
|
|
|
|
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",
|
2022-01-12 05:28:53 +08:00
|
|
|
"//c-toxcore/toxcore:Messenger",
|
|
|
|
"//c-toxcore/toxcore:TCP_connection",
|
|
|
|
"//c-toxcore/toxcore:ccompat",
|
|
|
|
"//c-toxcore/toxcore:crypto_core",
|
|
|
|
"//c-toxcore/toxcore:friend_connection",
|
|
|
|
"//c-toxcore/toxcore:logger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
|
|
|
"//c-toxcore/toxcore:net_crypto",
|
|
|
|
"//c-toxcore/toxcore:network",
|
|
|
|
"//c-toxcore/toxcore:onion",
|
|
|
|
"//c-toxcore/toxcore:onion_announce",
|
|
|
|
"//c-toxcore/toxcore:onion_client",
|
2018-01-22 00:58:32 +08:00
|
|
|
"//c-toxcore/toxencryptsave",
|
2022-01-12 05:28:53 +08:00
|
|
|
"@libsodium",
|
|
|
|
"@libvpx",
|
2018-01-18 23:14:50 +08:00
|
|
|
],
|
2020-04-20 08:16:33 +08:00
|
|
|
) for src in glob(["*_test.c"])]
|