Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Co-Authored-By: H. Vetinari <h.vetinari@gmx.com>
  • Loading branch information
isuruf and h-vetinari committed Nov 16, 2021
1 parent d7f9ff6 commit 17f79b1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,8 @@ def cuda_enabled_recipe(config_yaml, request):
package:
name: py-test
version: 1.0.0
build:
skip: True # [os.environ.get("CF_CUDA_ENABLED") != "True"]
requirements:
build:
- {{ compiler('c') }}
Expand Down
10 changes: 9 additions & 1 deletion tests/test_configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ def test_cos7_env_render(py_recipe, jinja_env):


def test_cuda_enabled_render(cuda_enabled_recipe, jinja_env):
forge_config = copy.deepcopy(cuda_enabled_recipe.config)
has_env = "CF_CUDA_ENABLED" in os.environ
if has_env:
old_val = os.environ["CF_CUDA_ENABLED"]
Expand All @@ -827,11 +828,18 @@ def test_cuda_enabled_render(cuda_enabled_recipe, jinja_env):
assert "CF_CUDA_ENABLED" not in os.environ
cnfgr_fdstk.render_azure(
jinja_env=jinja_env,
forge_config=cuda_enabled_recipe.config,
forge_config=forge_config,
forge_dir=cuda_enabled_recipe.recipe,
)
assert os.environ["CF_CUDA_ENABLED"] == "True"

# this configuration should be run
assert forge_config["azure"]["enabled"]
matrix_dir = os.path.join(cuda_enabled_recipe.recipe, ".ci_support")
assert os.path.isdir(matrix_dir)
# single matrix entry - readme is generated later in main function
assert len(os.listdir(matrix_dir)) == 6

finally:
if has_env:
os.environ["CF_CUDA_ENABLED"] = old_val
Expand Down

0 comments on commit 17f79b1

Please sign in to comment.