Skip to content

Commit

Permalink
add expected result for multi-version embree test
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Aug 6, 2024
1 parent 843d63d commit 92876d8
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 3 deletions.
47 changes: 47 additions & 0 deletions tests/data/version/embree/expected.yaml
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions tests/data/version/embree/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/
Expand Down
8 changes: 8 additions & 0 deletions tests/test_recipe_modification.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 92876d8

Please sign in to comment.