Skip to content

Commit

Permalink
test: test_package for .tar.bz2 and .conda
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed May 6, 2024
1 parent 6b605c0 commit 47c99dc
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import re
import sys
import subprocess as sp
import pytest
Expand Down Expand Up @@ -1246,3 +1247,28 @@ def test_skip_unsatisfiable_pin_compatible(config_fixture):
)
assert build_result
assert len(utils.load_all_meta(r.recipe_dirs["two"])) == 1


@pytest.mark.skipif(SKIP_DOCKER_TESTS, reason='skipping on osx')
@pytest.mark.parametrize('pkg_format', [1, 2])
def test_pkg_test_conda_package_format(pkg_format):
"""
Running a mulled-build test with .tar.bz2/.conda package formats
"""
# Override conda_build.pkg_format in build_script_template.
# (1 is .tar.bz2 and 2 is .conda)
build_script_template = re.sub(
"^(conda config.*)",
f"conda config --set conda_build.pkg_format {pkg_format}\n\\1",
docker_utils.BUILD_SCRIPT_TEMPLATE,
count=1,
flags=re.M,
)
docker_builder = docker_utils.RecipeBuilder(
use_host_conda_bld=True,
docker_base_image=DOCKER_BASE_IMAGE,
build_script_template=build_script_template,
)
built_packages = _build_pkg(RECIPE_ONE, docker_builder=docker_builder)
for pkg in built_packages:
pkg_test.test_package(pkg)

0 comments on commit 47c99dc

Please sign in to comment.