2
0
Fork 0
mirror of https://github.com/bazelbuild/bazel-skylib synced 2024-11-26 04:30:24 +00:00
bazel-skylib/rules/BUILD
László Csomor c585222071
New rules: native_binary and native_test (#152)
native_binary() wraps a pre-built binary or script
in a *_binary rule interface. Rules like genrule
can tool-depend on it, and it can be executed with
"bazel run". This rule can also augment the binary
with runfiles.

native_test() is similar, but creates a testable
rule instead of a binary rule.

Fixes https://github.com/bazelbuild/bazel-skylib/issues/148

RELNOTES[NEW]: The new `native_binary()` and `native_test()` rules let you wrap a pre-built binary in a binary and test rule respectively.
2019-05-14 13:33:01 +02:00

48 lines
978 B
Python

load("//:bzl_library.bzl", "bzl_library")
licenses(["notice"])
package(default_visibility = ["//visibility:public"])
bzl_library(
name = "build_test",
srcs = ["build_test.bzl"],
deps = ["//lib:new_sets"],
)
bzl_library(
name = "copy_file",
srcs = ["copy_file.bzl"],
deps = ["//rules/private:copy_file_private"],
)
bzl_library(
name = "write_file",
srcs = ["write_file.bzl"],
deps = ["//rules/private:write_file_private"],
)
bzl_library(
name = "diff_test",
srcs = ["diff_test.bzl"],
)
bzl_library(
name = "native_binary",
srcs = ["native_binary.bzl"],
deps = ["//rules/private:copy_file_private"],
)
# Exported for build_test.bzl to make sure of, it is an implementation detail
# of the rule and should not be directly used by anything else.
exports_files(["empty_test.sh"])
filegroup(
name = "test_deps",
testonly = True,
srcs = [
"BUILD",
"empty_test.sh",
] + glob(["*.bzl"]),
)