Skip to content

Commit

Permalink
Remove the <name>_corpus_zip rule and its deps. (#93)
Browse files Browse the repository at this point in the history
The rule is currently unused and will be superseded by other rules creating their own corpus ZIP archive.
  • Loading branch information
stefanbucur authored Dec 16, 2020
1 parent afabe91 commit 7ddfece
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 25 deletions.
9 changes: 0 additions & 9 deletions docs/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ bzl_library(
],
)

bzl_library(
name = "rules_pkg",
srcs = [
"@rules_pkg//:path.bzl",
"@rules_pkg//:pkg.bzl",
],
)

bzl_library(
name = "cc_fuzzing_rules",
srcs = [
Expand All @@ -53,7 +45,6 @@ bzl_library(
],
deps = [
":rules_cc",
":rules_pkg",
],
)

Expand Down
1 change: 0 additions & 1 deletion docs/cc-fuzzing-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ For each fuzz test `<name>`, this macro expands into a number of targets:
simpler, engine-agnostic command line interface.
* `<name>_corpus`: Generates a corpus directory containing all the corpus
files specified in the `corpus` attribute.
* `<name>_corpus_zip`: Generates a zip archive of the corpus directory.
* `<name>_dict`: Validates the set of dictionary files provided and emits
the result to a `<name>.dict` file.
* `<name>_raw`: The raw, uninstrumented fuzz test executable. This should be
Expand Down
2 changes: 0 additions & 2 deletions fuzzing/dependency_imports.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,11 @@

load("@rules_python//python:pip.bzl", "pip_install")
load("@rules_python//python:repositories.bzl", "py_repositories")
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

def fuzzing_dependency_imports():
"""Imports the dependencies of the external repositories."""
py_repositories()
rules_pkg_dependencies()
bazel_skylib_workspace()

pip_install(
Expand Down
6 changes: 0 additions & 6 deletions fuzzing/private/fuzz_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"""The implementation of the cc_fuzz_test rule."""

load("@rules_cc//cc:defs.bzl", "cc_test")
load("@rules_pkg//:pkg.bzl", "pkg_zip")
load("//fuzzing/private:common.bzl", "fuzzing_corpus", "fuzzing_dictionary", "fuzzing_launcher")
load("//fuzzing/private:instrument.bzl", "instrumented_fuzzing_binary")

Expand All @@ -38,7 +37,6 @@ def cc_fuzz_test(
simpler, engine-agnostic command line interface.
* `<name>_corpus`: Generates a corpus directory containing all the corpus
files specified in the `corpus` attribute.
* `<name>_corpus_zip`: Generates a zip archive of the corpus directory.
* `<name>_dict`: Validates the set of dictionary files provided and emits
the result to a `<name>.dict` file.
* `<name>_raw`: The raw, uninstrumented fuzz test executable. This should be
Expand Down Expand Up @@ -81,10 +79,6 @@ def cc_fuzz_test(
name = name + "_corpus",
srcs = corpus,
)
pkg_zip(
name = name + "_corpus_zip",
srcs = [name + "_corpus"],
)
if dicts:
fuzzing_dictionary(
name = name + "_dict",
Expand Down
9 changes: 2 additions & 7 deletions fuzzing/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

def rules_fuzzing_dependencies():
"""Instantiates the dependencies of the fuzzing rules."""

maybe(
http_archive,
name = "rules_python",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.1.0/rules_python-0.1.0.tar.gz",
sha256 = "b6d46438523a3ec0f3cead544190ee13223a52f6a6765a29eae7b7cc24cc83a0",
)

maybe(
http_archive,
name = "rules_pkg",
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.5/rules_pkg-0.2.5.tar.gz",
sha256 = "352c090cc3d3f9a6b4e676cf42a6047c16824959b438895a76c2989c6d7c246a",
)

maybe(
http_archive,
name = "bazel_skylib",
Expand Down

0 comments on commit 7ddfece

Please sign in to comment.