rattler-build
rattler-build copied to clipboard
Test scripts expressions are wrong evaluated
Having following in recipe.yaml:
tests:
- requirements:
run:
- bzip2
script:
- if: unix
then:
- test -f ${PREFIX}/fonts/Inconsolata-Regular.ttf
- test -f ${PREFIX}/fonts/Inconsolata-Bold.ttf
will throw an error on windows: help: expected field ``script`` to be a list of commands
until you add - echo 'hello'.
I think we need treat if:then as a list in this case or treat it as an empty list
I agree that this could be fixed. There is a workaround though, and that would be to put the whole test in a if-construct, e.g.:
tests:
- if: unix
then:
requirements:
run:
- bzip2
script:
- test -f ${PREFIX}/fonts/Inconsolata-Regular.ttf
- test -f ${PREFIX}/fonts/Inconsolata-Bold.ttf
This also has the benefit that rattler-build would not create a test environment with bzip2 installed, and save some time on Windows.