rattler-build
rattler-build copied to clipboard
Better support for cross-running tests
Currently script tests are "rendered" in the context of the current build platform. However, they might be executed on another platform from where they have been built (e.g. after cross-compiling someone might execute the tests on native hardware to make sure things work).
To support this use case, we should not store the rendered test time dependencies but rather the "source" from the recipe. At test time we should render the dependencies with the current test-machine configuration.
Something like the following should work:
tests:
- script:
- if: target_platform != build_platform
then:
- run_emulator.py bla
else:
- bla
requirements:
build:
- ${{ "emulator" if target_platform != build_platform }}
First steps have been made in #935 but this does not use a "un-evaluated" form and so still has the same issue.