test: Add check-c run to bazel build.

Makes iterating on both check-c and the toxcore code easier.
This commit is contained in:
iphydf 2023-12-15 22:49:33 +00:00
parent 15ee46d431
commit 89b6450d66
No known key found for this signature in database
GPG Key ID: 3855DBA2D74403C9
2 changed files with 28 additions and 0 deletions

View File

@ -22,6 +22,28 @@ sh_test(
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",

View File

@ -7,3 +7,9 @@ cc_library(
copts = ["-DCMP_NO_FLOAT"],
visibility = ["//c-toxcore:__subpackages__"],
)
filegroup(
name = "headers",
srcs = ["cmp/cmp.h"],
visibility = ["//c-toxcore:__subpackages__"],
)