Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add check-c run to bazel build. #2470

Merged
merged 1 commit into from
Dec 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: Add check-c run to bazel build.
Makes iterating on both check-c and the toxcore code easier.
  • Loading branch information
iphydf committed Dec 15, 2023
commit 89b6450d660d6afd279d49d9576085358a185fcb
22 changes: 22 additions & 0 deletions testing/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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",
6 changes: 6 additions & 0 deletions third_party/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -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__"],
)