2020-04-27 10:57:21 +08:00
|
|
|
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
|
2018-01-22 00:58:32 +08:00
|
|
|
|
2022-01-11 23:26:32 +08:00
|
|
|
package(features = ["layering_check"])
|
|
|
|
|
2021-12-13 23:36:50 +08:00
|
|
|
CIMPLE_FILES = [
|
|
|
|
"//c-toxcore/toxav:cimple_files",
|
|
|
|
"//c-toxcore/toxcore:cimple_files",
|
|
|
|
"//c-toxcore/toxencryptsave:cimple_files",
|
|
|
|
]
|
|
|
|
|
|
|
|
sh_test(
|
|
|
|
name = "cimple_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["//hs-tokstyle/tools:check-cimple"],
|
2022-01-13 03:02:02 +08:00
|
|
|
args = ["$(locations %s)" % f for f in CIMPLE_FILES] + [
|
2022-02-03 09:50:23 +08:00
|
|
|
"-Wno-callback-names",
|
2022-01-17 18:01:26 +08:00
|
|
|
"-Wno-enum-names",
|
2022-02-03 09:50:23 +08:00
|
|
|
"-Wno-memcpy-structs",
|
2022-01-13 03:02:02 +08:00
|
|
|
"+RTS",
|
|
|
|
"-N3",
|
|
|
|
],
|
2021-12-13 23:36:50 +08:00
|
|
|
data = CIMPLE_FILES,
|
|
|
|
tags = ["haskell"],
|
|
|
|
)
|
|
|
|
|
2022-02-05 22:37:01 +08:00
|
|
|
sh_test(
|
|
|
|
name = "cimplefmt_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["//hs-cimple/tools:cimplefmt"],
|
|
|
|
args = ["$(locations %s)" % f for f in CIMPLE_FILES],
|
|
|
|
data = CIMPLE_FILES,
|
|
|
|
tags = ["haskell"],
|
|
|
|
)
|
|
|
|
|
2018-01-18 23:14:50 +08:00
|
|
|
cc_library(
|
|
|
|
name = "misc_tools",
|
2022-01-16 10:02:53 +08:00
|
|
|
testonly = 1,
|
2018-07-17 06:46:02 +08:00
|
|
|
srcs = ["misc_tools.c"],
|
|
|
|
hdrs = ["misc_tools.h"],
|
2018-01-23 03:34:52 +08:00
|
|
|
visibility = ["//c-toxcore:__subpackages__"],
|
2022-01-11 23:26:32 +08:00
|
|
|
deps = [
|
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-02-12 21:38:00 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2022-01-11 23:26:32 +08:00
|
|
|
"@libsodium",
|
|
|
|
],
|
2018-01-18 23:14:50 +08:00
|
|
|
)
|
2018-01-20 22:09:50 +08:00
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "DHT_test",
|
2022-01-16 10:02:53 +08:00
|
|
|
testonly = 1,
|
2018-01-20 22:09:50 +08:00
|
|
|
srcs = ["DHT_test.c"],
|
|
|
|
deps = [
|
|
|
|
":misc_tools",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:DHT",
|
|
|
|
"//c-toxcore/toxcore:Messenger",
|
|
|
|
"//c-toxcore/toxcore:friend_requests",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2018-01-20 22:09:50 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cc_binary(
|
|
|
|
name = "Messenger_test",
|
2022-01-16 10:02:53 +08:00
|
|
|
testonly = 1,
|
2018-01-20 22:09:50 +08:00
|
|
|
srcs = ["Messenger_test.c"],
|
|
|
|
deps = [
|
|
|
|
":misc_tools",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:Messenger",
|
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2018-01-20 22:09:50 +08:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2018-06-19 08:41:30 +08:00
|
|
|
cc_binary(
|
|
|
|
name = "random_testing",
|
2022-01-16 10:02:53 +08:00
|
|
|
testonly = 1,
|
2018-06-19 08:41:30 +08:00
|
|
|
srcs = ["random_testing.cc"],
|
|
|
|
deps = [
|
|
|
|
":misc_tools",
|
2022-02-12 21:38:00 +08:00
|
|
|
"//c-toxcore/toxcore:tox",
|
2018-06-19 08:41:30 +08:00
|
|
|
],
|
|
|
|
)
|