Skip to content

Commit

Permalink
test: Add check-c run to bazel build.
Browse files Browse the repository at this point in the history
Makes iterating on both check-c and the toxcore code easier.
  • Loading branch information
iphydf committed Dec 15, 2023
1 parent 15ee46d commit 89b6450
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
22 changes: 22 additions & 0 deletions testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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__"],
)

0 comments on commit 89b6450

Please sign in to comment.