diff options
| author | ras0219 <533828+ras0219@users.noreply.github.com> | 2020-12-17 11:35:08 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-17 11:35:08 -0800 |
| commit | 9a81392e48e88ac4789107b100b93504d4ac713c (patch) | |
| tree | 895a03748f7f93a09b23c22463c050ad0dabe896 /scripts/azure-pipelines | |
| parent | a268c5a7f1aa0e933924bc09d48d92f0120769e5 (diff) | |
| download | vcpkg-9a81392e48e88ac4789107b100b93504d4ac713c.tar.gz vcpkg-9a81392e48e88ac4789107b100b93504d4ac713c.zip | |
[vcpkg] `VCPKG_ENV_PASSTHROUGH_UNTRACKED` (#15115)
* [vcpkg] Add VCPKG_ENV_PASSTHROUGH_UNTRACKED
* [vcpkg] CR comments
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'scripts/azure-pipelines')
| -rw-r--r-- | scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 new file mode 100644 index 000000000..6de1335d7 --- /dev/null +++ b/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 @@ -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
+}
\ No newline at end of file |
