rattler-build
rattler-build copied to clipboard
variant env vars not set for test scripts
In conda-build, variant values are set as env vars in build and test scripts. #1056 reported this for build scripts which appears to be fixed by #1088, but only for build scripts. Test scripts appear to still lack these env vars.
I can work around this with:
test:
script:
file: script-name
env:
name: ${{ name }}
for any variables I use in the test, but I'm not sure if the inconsistency is intentional.
This will actually prevent a ucx fix from having its effect on v1 recipes, since $target_platform is not set: https://github.com/conda-forge/ucx-split-feedstock/pull/207
also related to this, CONDA_BUILD is not set in the test env, causing activation problems in some conda-forge infrastructure.
Ideally, env_vars::vars and env_vars_from_variant would be run on the test env for consistency, but that seems tricky since the test apparently only has access to the final package, not the Output object, which these functions require. It's unclear to me how to get that information at test time, though it does seem to exist in package metadata. Any pointers, @wolfv?
Looks like CONDA_BUILD is currently being set. Can anyone confirm?