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
|
|
|
|
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-25 22:31:51 +08:00
|
|
|
"-Wno-boolean-return",
|
2022-02-03 09:50:23 +08:00
|
|
|
"-Wno-callback-names",
|
2022-01-13 03:02:02 +08:00
|
|
|
"+RTS",
|
2023-12-18 21:15:49 +08:00
|
|
|
"-N4",
|
2022-03-21 19:54:40 +08:00
|
|
|
"-RTS",
|
2022-01-13 03:02:02 +08:00
|
|
|
],
|
2021-12-13 23:36:50 +08:00
|
|
|
data = CIMPLE_FILES,
|
2023-12-24 08:16:32 +08:00
|
|
|
tags = [
|
|
|
|
"haskell",
|
|
|
|
"no-cross",
|
|
|
|
],
|
2021-12-13 23:36:50 +08:00
|
|
|
)
|
|
|
|
|
2023-12-16 06:49:33 +08:00
|
|
|
sh_test(
|
|
|
|
name = "c_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["//hs-tokstyle/tools:check-c"],
|
|
|
|
args = [
|
|
|
|
"--cc=$(CC)",
|
|
|
|
"-Iexternal/libsodium/include",
|
|
|
|
"-Iexternal/libvpx",
|
|
|
|
"-Iexternal/opus/include",
|
|
|
|
"-Ihs-tokstyle/include",
|
2023-12-18 21:15:49 +08:00
|
|
|
] + ["$(locations %s)" % f for f in CIMPLE_FILES] + [
|
|
|
|
"+RTS",
|
|
|
|
"-N4",
|
|
|
|
"-RTS",
|
|
|
|
],
|
2023-12-16 06:49:33 +08:00
|
|
|
data = CIMPLE_FILES + [
|
|
|
|
"//c-toxcore/third_party:headers",
|
|
|
|
"//hs-tokstyle:headers",
|
|
|
|
"@libsodium//:headers",
|
|
|
|
"@libvpx//:headers",
|
|
|
|
"@opus//:headers",
|
|
|
|
],
|
2023-12-24 08:16:32 +08:00
|
|
|
tags = [
|
|
|
|
"haskell",
|
|
|
|
"no-cross",
|
|
|
|
],
|
2023-12-16 06:49:33 +08:00
|
|
|
toolchains = ["@rules_cc//cc:current_cc_toolchain"],
|
|
|
|
)
|
|
|
|
|
2022-02-05 22:37:01 +08:00
|
|
|
sh_test(
|
|
|
|
name = "cimplefmt_test",
|
|
|
|
size = "small",
|
|
|
|
srcs = ["//hs-cimple/tools:cimplefmt"],
|
2022-02-22 06:37:42 +08:00
|
|
|
args = ["--reparse"] + ["$(locations %s)" % f for f in CIMPLE_FILES],
|
2022-02-05 22:37:01 +08:00
|
|
|
data = CIMPLE_FILES,
|
2023-12-24 08:16:32 +08:00
|
|
|
tags = [
|
|
|
|
"haskell",
|
|
|
|
"no-cross",
|
|
|
|
],
|
2022-02-05 22:37:01 +08:00
|
|
|
)
|
|
|
|
|
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 = "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",
|
2022-03-04 04:15:09 +08:00
|
|
|
"//c-toxcore/toxcore:ccompat",
|
2022-01-11 23:26:32 +08:00
|
|
|
"//c-toxcore/toxcore:mono_time",
|
2018-01-20 22:09:50 +08:00
|
|
|
],
|
|
|
|
)
|