rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Make test environment override test rule attr env and runner info

Open ghvg1313 opened this issue 5 years ago • 5 comments

Currently test rule will respect test rule's env attribute over manual test_env specification, this seems a bit counter-intuitive when setting test environment explicitly like bazel test --test_env=FOO=BAR doesn't get what you want

ghvg1313 avatar Jul 28 '20 17:07 ghvg1313

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 28 '20 17:07 googlebot

@googlebot I signed it!

ghvg1313 avatar Jul 28 '20 17:07 ghvg1313

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

googlebot avatar Jul 28 '20 17:07 googlebot

I believe this is expected, this mirrors the behavior of defining copts on targets as well I think? For example if you have:

cc_library(
    name = "counter",
    srcs = ["counter.cc"],
    hdrs = ["counter.h"],
    copts = ["-DFOO"],
)

And run:

bazel build //:counter --copt=-DBAR -s

The invocation has -DBAR -DFOO, so if the args were competing the copts on cc_library would win.

keith avatar Aug 11 '20 01:08 keith

Related tests which current encode the behavior I'm describing https://github.com/bazelbuild/rules_apple/pull/868

keith avatar Aug 11 '20 01:08 keith