Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.7 KB

bats.md

File metadata and controls

45 lines (31 loc) · 1.7 KB

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, data, env, srcs)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
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 {}
srcs Test files List of labels optional []