keith / rules_multirun

Bazel rules for running multiple commands in parallel in a single bazel invocation
Apache License 2.0
79 stars 16 forks source link

Forward *_binary args and env to multirun #16

Closed aherrmann closed 1 year ago

aherrmann commented 1 year ago

Closes #3

This is a convenient feature to have to integrate rules_multirun with existing *_binary targets that already have args and env attributes set without having to duplicate these attributes on an intermediate command target.

This PR adds an aspect that collects the common args and env attributes of *_binary rules, taking location expansion into account. It applies said aspect to the commands attribute of multirun and forwards the args and env to multirun.py. And it changes multirun.py to forward the args and env to the target command.

It also adds test cases for args and env forwarding, including location expansion.