runner: propagate 'testonly' property to sh_binary (#2002)

this makes sure that if testonly is set in the macro, it's propagated
both to the runner _and_ the wrapper sh_binary. as is, setting
'testonly' in the macro will result in an unbuildable sh_binary if there
are testonly dependencies.

why this is needed: slightly esoteric, but our build process currently
uses the gazelle plugin from contrib_rules_jvm. for uninteresting
reasons, this depends on the output of another tool, which itself needs
to process testonly dependencies.

it's a silly little patch we've been carrying for a while, but since
currently
setting the property as is results in breakage, thought i might have a
shot
at upstreaming it.
1 file changed