diff --git a/tests/test-recipes/metadata/entry_points/meta.yaml b/tests/test-recipes/metadata/entry_points/meta.yaml index 217fcaa30e..ac07a8cb4b 100644 --- a/tests/test-recipes/metadata/entry_points/meta.yaml +++ b/tests/test-recipes/metadata/entry_points/meta.yaml @@ -20,3 +20,7 @@ requirements: - setuptools run: - python + +# Ensure we get different build strings for concurrently tested packages. +extra: + dummy: '{{ pytest_name is defined }}' diff --git a/tests/test_api_build.py b/tests/test_api_build.py index 0a61a414c3..5e08ee5c4d 100644 --- a/tests/test_api_build.py +++ b/tests/test_api_build.py @@ -1655,14 +1655,15 @@ def test_provides_features_metadata(testing_config): assert index["provides_features"] == {"test2": "also_ok"} -# using different MACOSX_DEPLOYMENT_TARGET in parallel causes some SDK race condition -# https://github.com/conda/conda-build/issues/4708 -@pytest.mark.serial -def test_overlinking_detection(testing_config, variants_conda_build_sysroot): +def test_overlinking_detection(testing_config, testing_workdir, variants_conda_build_sysroot): testing_config.activate = True testing_config.error_overlinking = True testing_config.verify = False - recipe = os.path.join(metadata_dir, "_overlinking_detection") + recipe = os.path.join(testing_workdir, "recipe") + copy_into( + os.path.join(metadata_dir, "_overlinking_detection"), + recipe, + ) dest_sh = os.path.join(recipe, "build.sh") dest_bat = os.path.join(recipe, "bld.bat") copy_into( @@ -1684,17 +1685,17 @@ def test_overlinking_detection(testing_config, variants_conda_build_sysroot): rm_rf(dest_bat) -# using different MACOSX_DEPLOYMENT_TARGET in parallel causes some SDK race condition -# https://github.com/conda/conda-build/issues/4708 -@pytest.mark.serial -@pytest.mark.flaky(reruns=5, reruns_delay=2) def test_overlinking_detection_ignore_patterns( - testing_config, variants_conda_build_sysroot + testing_config, testing_workdir, variants_conda_build_sysroot ): testing_config.activate = True testing_config.error_overlinking = True testing_config.verify = False - recipe = os.path.join(metadata_dir, "_overlinking_detection_ignore_patterns") + recipe = os.path.join(testing_workdir, "recipe") + copy_into( + os.path.join(metadata_dir, "_overlinking_detection_ignore_patterns"), + recipe, + ) dest_sh = os.path.join(recipe, "build.sh") dest_bat = os.path.join(recipe, "bld.bat") copy_into( diff --git a/tests/test_api_build_conda_v2.py b/tests/test_api_build_conda_v2.py index 25e7915848..2d95b4652c 100644 --- a/tests/test_api_build_conda_v2.py +++ b/tests/test_api_build_conda_v2.py @@ -23,10 +23,11 @@ def test_conda_pkg_format(pkg_format, pkg_ext, testing_config, monkeypatch, capf monkeypatch.setenv("CONDA_TEST_VAR", "conda_test") monkeypatch.setenv("CONDA_TEST_VAR_2", "conda_test_2") - (output_file,) = api.get_output_file_paths(recipe, config=testing_config) + variants = {"pytest_name": [request.node.name]} + (output_file,) = api.get_output_file_paths(recipe, config=testing_config, variants=variants) assert output_file.endswith(pkg_ext) - api.build(recipe, config=testing_config) + api.build(recipe, config=testing_config, variants=variants) assert os.path.exists(output_file) out, err = capfd.readouterr() diff --git a/tests/test_api_convert.py b/tests/test_api_convert.py index 8eacad1475..60b4f61a55 100644 --- a/tests/test_api_convert.py +++ b/tests/test_api_convert.py @@ -194,9 +194,10 @@ def test_convert_platform_to_others(base_platform, package): @pytest.mark.skipif( on_win, reason="we create the pkg to be converted in *nix; don't run on win." ) -def test_convert_from_unix_to_win_creates_entry_points(testing_config): +def test_convert_from_unix_to_win_creates_entry_points(testing_config, request): recipe_dir = os.path.join(metadata_dir, "entry_points") - fn = api.build(recipe_dir, config=testing_config)[0] + variants = {"pytest_name": [request.node.name]} + fn = api.build(recipe_dir, config=testing_config, variants=variants)[0] for platform in ["win-64", "win-32"]: api.convert(fn, platforms=[platform], force=True) converted_fn = os.path.join(platform, os.path.basename(fn))