Skip to content

Commit

Permalink
providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance (canon…
Browse files Browse the repository at this point in the history
…ical#3997)

Signed-off-by: Callahan Kovacs <callahan.kovacs@canonical.com>
  • Loading branch information
mr-cal authored Nov 30, 2022
1 parent a6af125 commit 31a3990
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions snapcraft/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 2 additions & 0 deletions tests/unit/test_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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",
}


Expand Down

0 comments on commit 31a3990

Please sign in to comment.