rattler-build icon indicating copy to clipboard operation
rattler-build copied to clipboard

Better support for cross-running tests

Open wolfv opened this issue 2 years ago • 1 comments

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 }}

wolfv avatar Jan 05 '24 09:01 wolfv

First steps have been made in #935 but this does not use a "un-evaluated" form and so still has the same issue.

wolfv avatar Jun 19 '24 12:06 wolfv