Skip to content

Commit

Permalink
add test for cache building
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfv committed Oct 2, 2024
1 parent 69a36dc commit 52272cd
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test-data/recipes/cache/recipe-cmake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
context:
version: 0.1.0
build_num: 0

recipe:
name: cache-installation
version: ${{ version }}

build:
number: ${{ build_num }}

cache:
requirements:
build:
- cmake
build:
script:
- cmake --version

outputs:
- package:
name: check-1

- package:
name: check-2
8 changes: 8 additions & 0 deletions test/end-to-end/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,3 +956,11 @@ def test_used_vars(rattler_build: RattlerBuild, recipes: Path, tmp_path: Path):
assert rendered[0]["build_configuration"]["variant"] == {
"target_platform": "noarch"
}

def test_cache_install(
rattler_build: RattlerBuild, recipes: Path, tmp_path: Path, snapshot_json
):
rattler_build.build(recipes / "cache/recipe-cmake.yaml", tmp_path)

pkg1 = get_extracted_package(tmp_path, "check-1")
pkg2 = get_extracted_package(tmp_path, "check-2")

0 comments on commit 52272cd

Please sign in to comment.