diff --git a/snapcraft/providers.py b/snapcraft/providers.py index cd07fe322c..23841b6c07 100644 --- a/snapcraft/providers.py +++ b/snapcraft/providers.py @@ -157,6 +157,7 @@ def get_command_environment( "SNAPCRAFT_BUILD_FOR", "SNAPCRAFT_BUILD_INFO", "SNAPCRAFT_IMAGE_INFO", + "SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT", ]: if env_key in os.environ: env[env_key] = os.environ[env_key] diff --git a/tests/unit/test_providers.py b/tests/unit/test_providers.py index ff13443e08..620a4edf06 100644 --- a/tests/unit/test_providers.py +++ b/tests/unit/test_providers.py @@ -255,6 +255,7 @@ def test_get_command_environment_passthrough( monkeypatch.setenv("SNAPCRAFT_BUILD_FOR", "test-build-for") monkeypatch.setenv("SNAPCRAFT_BUILD_INFO", "test-build-info") monkeypatch.setenv("SNAPCRAFT_IMAGE_INFO", "test-image-info") + monkeypatch.setenv("SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT", "test-build-count") # ensure other variables are not being passed monkeypatch.setenv("other_var", "test-other-var") @@ -271,6 +272,7 @@ def test_get_command_environment_passthrough( "SNAPCRAFT_BUILD_FOR": "test-build-for", "SNAPCRAFT_BUILD_INFO": "test-build-info", "SNAPCRAFT_IMAGE_INFO": "test-image-info", + "SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT": "test-build-count", }