mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-27 05:43:25 +00:00
8d4f7612b2
maprule() is an improved version of native.genrule(), with the following advantages: - Maprule can process source files in parallel, creating separate actions for each of them. - Maprule does not require declaring all output files. Instead you declare templates for the output files yielded for each source. Therefore N source files and M templates yield N*M outputs. - Maprule supports both Bash and cmd.exe syntax for its commands via the specialized rules bash_maprule and cmd_maprule. - Maprule's cmd attribute does deliberately not support $(location) expression nor Make Variables, in order to avoid issues and challenges with quoting. (In case of cmd.exe passing empty arguments is impossible). These paths can be passed as envvars instead. - Maprule's add_env attribute does support $(location) expressions (and some extra placeholders) and is the idiomatic way to pass execpaths of labels in "tools" or "srcs" (the shared sources available for all actions) to the command. See https://github.com/bazelbuild/bazel/issues/4319
39 lines
859 B
Python
39 lines
859 B
Python
load(":collections_tests.bzl", "collections_test_suite")
|
|
load(":dicts_tests.bzl", "dicts_test_suite")
|
|
load(":maprule_tests.bzl", "maprule_test_suite")
|
|
load(":new_sets_tests.bzl", "new_sets_test_suite")
|
|
load(":partial_tests.bzl", "partial_test_suite")
|
|
load(":paths_tests.bzl", "paths_test_suite")
|
|
load(":selects_tests.bzl", "selects_test_suite")
|
|
load(":sets_tests.bzl", "sets_test_suite")
|
|
load(":shell_tests.bzl", "shell_test_suite")
|
|
load(":structs_tests.bzl", "structs_test_suite")
|
|
load(":types_tests.bzl", "types_test_suite")
|
|
load(":versions_tests.bzl", "versions_test_suite")
|
|
|
|
licenses(["notice"])
|
|
|
|
collections_test_suite()
|
|
|
|
dicts_test_suite()
|
|
|
|
maprule_test_suite()
|
|
|
|
partial_test_suite()
|
|
|
|
paths_test_suite()
|
|
|
|
selects_test_suite()
|
|
|
|
sets_test_suite()
|
|
|
|
new_sets_test_suite()
|
|
|
|
shell_test_suite()
|
|
|
|
structs_test_suite()
|
|
|
|
types_test_suite()
|
|
|
|
versions_test_suite()
|