2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-12-03 11:52:43 +00:00
bazel-lib/docs/bats.md
Alex Eagle 0f5e1dcafd
chore(deps): upgrade stardoc (#894)
* chore(deps): upgrade stardoc

This uses the Bazel 7 'starlark_doc_extract' rule which our docsite expects for slurping data.

* chore: stardoc setup in WORKSPACE too

* chore: skip stardoc on bazel 6 in cases where the legacy extractor produces different docstrings
2024-08-08 12:56:11 -07:00

1.6 KiB
Generated

A test rule that invokes the Bash Automated Testing System.

For example, a bats_test target containing a single .bat and basic configuration:

bats_test(
    name = "my_test",
    size = "small",
    srcs = [
        "my_test.bats",
    ],
    data = [
        "data.bin",
    ],
    env = {
        "DATA_PATH": "$(location :data.bin)",
    },
    args = ["--timing"],
)

bats_test

bats_test(name, srcs, data, env)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
srcs Test files List of labels optional []
data Runtime dependencies of the test. List of labels optional []
env Environment variables of the action.

Subject to $(location) and "Make variable" substitution.
Dictionary: String -> String optional {}