-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure package_dir is always filled in. (#1103)
Resolves microsoft/vcpkg#31908 In #1040 , create_feature_install_plan and create_versioned_install_plan were fixed, but not create_upgrade_plan. Make this bug structurally impossible by making the FooAction ctors that fill in m_scfl also fill in package_dir.
- Loading branch information
1 parent
add000a
commit f19f3d9
Showing
8 changed files
with
107 additions
and
46 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
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,48 @@ | ||
. "$PSScriptRoot/../end-to-end-tests-prelude.ps1" | ||
|
||
git clone $VcpkgRoot "$TestingRoot/temp-repo" --local | ||
try | ||
{ | ||
$env:VCPKG_ROOT = "$TestingRoot/temp-repo" | ||
git -C "$TestingRoot/temp-repo" switch -d e1934f4a2a0c58bb75099d89ed980832379907fa # vcpkg-cmake @ 2022-12-22 | ||
$output = Run-VcpkgAndCaptureOutput install vcpkg-cmake | ||
Throw-IfFailed | ||
if (-Not ($output -match 'vcpkg-cmake:[^ ]+ -> 2022-12-22')) | ||
{ | ||
throw 'Unexpected vcpkg-cmake install' | ||
} | ||
|
||
git -C "$TestingRoot/temp-repo" switch -d f6a5d4e8eb7476b8d7fc12a56dff300c1c986131 # vcpkg-cmake @ 2023-05-04 | ||
$output = Run-VcpkgAndCaptureOutput upgrade | ||
Throw-IfNotFailed | ||
if (-Not ($output -match 'If you are sure you want to rebuild the above packages, run this command with the --no-dry-run option.')) | ||
{ | ||
throw "Upgrade didn't handle dry-run correctly" | ||
} | ||
|
||
if (-Not ($output -match '\* vcpkg-cmake:[^ ]+ -> 2023-05-04')) | ||
{ | ||
throw "Upgrade didn't choose expected version" | ||
} | ||
|
||
$output = Run-VcpkgAndCaptureOutput upgrade --no-dry-run | ||
Throw-IfFailed | ||
if (-Not ($output -match '\* vcpkg-cmake:[^ ]+ -> 2023-05-04')) | ||
{ | ||
throw "Upgrade didn't choose expected version" | ||
} | ||
|
||
if (-Not ($output -match 'vcpkg-cmake:[^:]+: REMOVED:')) | ||
{ | ||
throw "Upgrade didn't remove" | ||
} | ||
|
||
if (-Not ($output -match 'vcpkg-cmake:[^:]+: SUCCEEDED:')) | ||
{ | ||
throw "Upgrade didn't install" | ||
} | ||
} | ||
finally | ||
{ | ||
$env:VCPKG_ROOT = $VcpkgRoot | ||
} |
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
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