diff --git a/tests/data/version/embree/expected.yaml b/tests/data/version/embree/expected.yaml new file mode 100644 index 0000000..4795ae2 --- /dev/null +++ b/tests/data/version/embree/expected.yaml @@ -0,0 +1,47 @@ +context: + name: embree + version: "3.7.0" + +package: + name: ${{ name }} + version: ${{ version }} + +source: + - if: osx + then: + file_name: ${{ name }}-${{ version }}.tar.gz + url: https://github.com/${{ name }}/${{ name }}/releases/download/v${{ version }}/${{ name }}-${{ version }}.x86_64.macosx.zip + sha256: 17c31f67efb9afc3ed658fcaa5886bc10c6f67f1e364d6494e494d189d8b8c70 + - if: linux + then: + file_name: ${{ name }}-${{ version }}.tar.gz + url: https://github.com/${{ name }}/${{ name }}/releases/download/v${{ version }}/${{ name }}-${{ version }}.x86_64.linux.tar.gz + sha256: 671a3aa7cc1c8501f1290dd051b42a337a692ea6552a07436779439d649e3e29 + - if: win + then: + file_name: ${{ name }}-${{ version }}.zip + url: https://github.com/${{ name }}/${{ name }}/releases/download/v${{ version }}/${{ name }}-${{ version }}.x64.vc14.windows.zip # [win] + sha256: 442c8933fa3a21d66c0459ded83e1a4c896b1a26c4e46ea62e65ffbfec273be2 + +build: + number: 100 + +requirements: + build: + - ${{ "python" if win }} + +tests: + - script: + - ${{ test -f "${PREFIX}/lib/libembree.so" if linux }} + - ${{ test -f "${PREFIX}/lib/libembree.dylib" if osx }} + +about: + homepage: https://embree.github.io/ + license: Apache 2.0 + license_file: doc/LICENSE.txt + summary: High Performance Ray Tracing Kernels + +extra: + recipe-maintainers: + - embree + - foo diff --git a/tests/data/version/embree/recipe.yaml b/tests/data/version/embree/recipe.yaml index 27cf5d7..9c34b76 100644 --- a/tests/data/version/embree/recipe.yaml +++ b/tests/data/version/embree/recipe.yaml @@ -10,7 +10,7 @@ source: - if: osx then: file_name: ${{ name }}-${{ version }}.tar.gz - url: https://github.com/${{ name }}/${{ name }}/releases/download/v${{ version }}/${{ name }}-${{ version }}.x86_64.macosx.tar.gz + url: https://github.com/${{ name }}/${{ name }}/releases/download/v${{ version }}/${{ name }}-${{ version }}.x86_64.macosx.zip sha256: f6113506bab9430f98773b0ab7776efe387f4d40c8785d8f8c427a91c36f4cfe - if: linux then: @@ -32,8 +32,8 @@ requirements: tests: - script: - - test -f "${PREFIX}/lib/libembree.so" # [linux] - - test -f "${PREFIX}/lib/libembree.dylib" # [osx] + - ${{ test -f "${PREFIX}/lib/libembree.so" if linux }} + - ${{ test -f "${PREFIX}/lib/libembree.dylib" if osx }} about: homepage: https://embree.github.io/ diff --git a/tests/test_recipe_modification.py b/tests/test_recipe_modification.py index c3550a7..a36662b 100644 --- a/tests/test_recipe_modification.py +++ b/tests/test_recipe_modification.py @@ -31,3 +31,11 @@ def test_version_mod(data_dir: Path) -> None: result = update_version(test_cran, "1.1-30", None) expected = test_cran.parent / "expected.yaml" assert result == expected.read_text() + + +def test_multi_source(data_dir: Path) -> None: + tests = data_dir / "version" + test_recipe = tests / "embree/recipe.yaml" + result = update_version(test_recipe, "3.7.0", None) + expected = test_recipe.parent / "expected.yaml" + assert result == expected.read_text()