tomato/testing/BUILD.bazel
Green Sky 83e200df43 Squashed 'external/toxcore/c-toxcore/' changes from adbd5b32d8..e29e185c03
e29e185c03 feat: add ngc events
2b0dc0f46b add ngc related unpack functions
b2315c50e0 Add groupchat API function that returns an IP address string for a peer
5f863a5492 feat: Add `to_string` functions for all public enums.
0c998a7598 add real timeout test
68c827609a chore: Move s390x build to post-merge.
028b017d79 perf: Slightly reduce bandwidth usage when there are few nodes.
90f7496819 feat: Enable ubsan on bootstrap nodes.
89b6450d66 test: Add check-c run to bazel build.
REVERT: adbd5b32d8 feat: add ngc events

git-subtree-dir: external/toxcore/c-toxcore
git-subtree-split: e29e185c03fea7337036e5ef4d1d9080a6cee721
2023-12-24 12:21:34 +01:00

80 lines
1.9 KiB
Python

load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
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"],
args = ["$(locations %s)" % f for f in CIMPLE_FILES] + [
"-Wno-boolean-return",
"-Wno-callback-names",
"-Wno-enum-names",
"+RTS",
"-N3",
"-RTS",
],
data = CIMPLE_FILES,
tags = ["haskell"],
)
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",
] + ["$(locations %s)" % f for f in CIMPLE_FILES],
data = CIMPLE_FILES + [
"//c-toxcore/third_party:headers",
"//hs-tokstyle:headers",
"@libsodium//:headers",
"@libvpx//:headers",
"@opus//:headers",
],
tags = ["haskell"],
toolchains = ["@rules_cc//cc:current_cc_toolchain"],
)
sh_test(
name = "cimplefmt_test",
size = "small",
srcs = ["//hs-cimple/tools:cimplefmt"],
args = ["--reparse"] + ["$(locations %s)" % f for f in CIMPLE_FILES],
data = CIMPLE_FILES,
tags = ["haskell"],
)
cc_library(
name = "misc_tools",
testonly = 1,
srcs = ["misc_tools.c"],
hdrs = ["misc_tools.h"],
visibility = ["//c-toxcore:__subpackages__"],
deps = [
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:tox",
"@libsodium",
],
)
cc_binary(
name = "Messenger_test",
testonly = 1,
srcs = ["Messenger_test.c"],
deps = [
":misc_tools",
"//c-toxcore/toxcore:Messenger",
"//c-toxcore/toxcore:ccompat",
"//c-toxcore/toxcore:mono_time",
],
)