Skip to content

Commit

Permalink
Project: Move fuzzing rules to bzlmod, fix santa_unit_test (#1339)
Browse files Browse the repository at this point in the history
  • Loading branch information
russellhancox committed May 8, 2024
1 parent b53818f commit 5ea4431
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 27 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_apple", version = "3.5.0", repo_name = "build_bazel_rules_apple")
bazel_dep(name = "rules_swift", version = "1.18.0", repo_name = "build_bazel_rules_swift")
bazel_dep(name = "rules_fuzzing", version = "0.5.1")
bazel_dep(name = "protobuf", version = "main", repo_name = "com_google_protobuf")
git_override(
module_name = "protobuf",
Expand Down
26 changes: 0 additions & 26 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -41,29 +41,3 @@ go_rules_dependencies()
go_register_toolchains(version = "1.19.3")

gazelle_dependencies()

# Fuzzing

# rules_fuzzing requires an older python for now
http_archive(
name = "rules_python_fuzz",
sha256 = "c03246c11efd49266e8e41e12931090b613e12a59e6f55ba2efd29a7cb8b4258",
strip_prefix = "rules_python-0.11.0",
url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.11.0.tar.gz",
)

git_repository(
name = "rules_fuzzing",
commit = "b193df79b10dbfb4c623bda23e825e835f12bada", # Commit post PR 213 which fixes macOS
remote = "https://github.com/bazelbuild/rules_fuzzing",
repo_mapping = {"@rules_python": "@rules_python_fuzz"},
shallow_since = "1668184479 -0500",
)

load("@rules_fuzzing//fuzzing:repositories.bzl", "rules_fuzzing_dependencies")

rules_fuzzing_dependencies()

load("@rules_fuzzing//fuzzing:init.bzl", "rules_fuzzing_init")

rules_fuzzing_init()
3 changes: 2 additions & 1 deletion helper.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def santa_unit_test(
name,
srcs = [],
deps = [],
data = [],
size = "medium",
minimum_os_version = "11.0",
resources = [],
Expand All @@ -39,7 +40,7 @@ def santa_unit_test(
srcs = srcs,
deps = deps,
copts = copts,
data = [":%s_resources" % name],
data = data + [":%s_resources" % name],
**kwargs
)

Expand Down

0 comments on commit 5ea4431

Please sign in to comment.