forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vcpkg]
VCPKG_ENV_PASSTHROUGH_UNTRACKED
(microsoft#15115)
* [vcpkg] Add VCPKG_ENV_PASSTHROUGH_UNTRACKED * [vcpkg] CR comments Co-authored-by: Robert Schumacher <[email protected]>
- Loading branch information
1 parent
cfcb59f
commit 3189e27
Showing
7 changed files
with
58 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
if (-not $IsLinux -and -not $IsMacOS) { | ||
. $PSScriptRoot/../end-to-end-tests-prelude.ps1 | ||
|
||
$env:_VCPKG_TEST_TRACKED = "a" | ||
$env:_VCPKG_TEST_UNTRACKED = "b" | ||
|
||
$x = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%" | ||
if ($x -ne "%_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%") | ||
{ | ||
throw "env should have cleaned the environment ($x)" | ||
} | ||
|
||
$y = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env --triplet passthrough "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%" | ||
if ($y -ne "a %_VCPKG_TEST_TRACKED2% b %_VCPKG_TEST_UNTRACKED2%") | ||
{ | ||
throw "env should have kept the environment ($y)" | ||
} | ||
|
||
rm env:_VCPKG_TEST_TRACKED | ||
rm env:_VCPKG_TEST_UNTRACKED | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
||
set(VCPKG_ENV_PASSTHROUGH _VCPKG_TEST_TRACKED _VCPKG_TEST_TRACKED2) | ||
set(VCPKG_ENV_PASSTHROUGH_UNTRACKED _VCPKG_TEST_UNTRACKED _VCPKG_TEST_UNTRACKED2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters