rules_apple icon indicating copy to clipboard operation
rules_apple copied to clipboard

Add tests for test env inheritance

Open keith opened this issue 5 years ago • 3 comments

Tests can come from a few places:

  1. --test_env
  2. test_environment on a test runner (as of https://github.com/bazelbuild/rules_apple/pull/682)
  3. env on a test target

This validates the order of these is what we expect if the same key appears in multiple of these places.

keith avatar Aug 11 '20 01:08 keith

The order is a bit tbd based on https://github.com/bazelbuild/rules_apple/pull/853

Also publicly until https://github.com/bazelbuild/rules_apple/pull/682 was merged rules_apple didn't have any test runners that provided this behavior. Custom test runners could have implemented this

keith avatar Aug 11 '20 01:08 keith

I'm maybe having a bit of trouble reading the tests -- which order are we going with here?

I'd think command line overrides test bundle overrides runner makes the most sense to me?

segiddins avatar Aug 13 '20 17:08 segiddins

sorry I should have been more clear in the description that the order is what's specified in my 1,2,3 above.

The goal here was to stick to the order of operations of copts as close as possible tho, where command line args come before copts on a target (where the runner itself having environment is a bit of an outlier, but I think it's closer to the target level than the command line flags)

keith avatar Aug 13 '20 17:08 keith