Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.aspect.build/llms.txt

Use this file to discover all available pages before exploring further.

sh_test rule definition.

Rule: sh_test

A sh_test() rule creates a test written as a Bourne shell script. See the attributes common to all test rules (*_test).

Examples

sh_test(
    name = "foo_integration_test",
    size = "small",
    srcs = ["foo_integration_test.sh"],
    deps = [":foo_sh_lib"],
    data = glob(["testdata/*.txt"]),
)
Kind: Test rule

Attributes

name
name
required
A unique name for this target.
srcs
list of labels
default:"[]"
The file containing the shell script.This attribute must be a singleton list, whose element is the shell script. This script must be executable, and may be a source file or a generated file. All other files required at runtime (whether scripts or data) belong in the data attribute.
data
list of labels
default:"[]"
deps
list of labels
default:"[]"
The list of “library” targets to be aggregated into this target. See general comments about deps at Typical attributes defined by most build rulesThis attribute should be used to list other sh_library rules that provide interpreted program source code depended on by the code in srcs. The files provided by these rules will be present among the runfiles of this target.
env
dictionary: String → String
default:"{}"
env_inherit
list of strings
default:"[]"
use_bash_launcher
boolean
default:"False"
Use a bash launcher initializing the runfiles library