forked from microsoft/vcpkg-tool
-
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.
Fix "build" for already installed ports. (microsoft#492)
* Fix "build" for already installed ports. Resolves microsoft/vcpkg#13933 Rather than attempting to deal with the condition that the plan created thinks the thing we want to build is already installed, this version just "removes" the thing we want to build from the in-memory status database before creating the plan. * clang-format * Change the condition to be an error instead of trying to make it work. * Localize some more build stuff. * Fix error message searches. * Robert CRs. * Fix dependences => dependencies typo.
- Loading branch information
1 parent
f92f59b
commit 52dc46e
Showing
11 changed files
with
162 additions
and
110 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
. $PSScriptRoot/../end-to-end-tests-prelude.ps1 | ||
|
||
$CurrentTest = "Build Command" | ||
|
||
# Test that the build command fails if dependencies are missing | ||
$out = (Run-Vcpkg -TestArgs ($commonArgs + @("build","vcpkg-hello-world-1","--host-triplet",$Triplet)) | Out-String) | ||
Throw-IfNotFailed | ||
if ($out -notmatch "The build command requires all dependencies to be already installed\.") | ||
{ | ||
$out | ||
throw "Expected to fail due to missing dependencies" | ||
} | ||
|
||
# Install the dependencies of vcpkg-hello-world-1 | ||
Run-Vcpkg -TestArgs ($commonArgs + @("install","vcpkg-cmake","vcpkg-cmake-config","--host-triplet",$Triplet)) | ||
Throw-IfFailed | ||
|
||
# Test that the build command works | ||
Run-Vcpkg -TestArgs ($commonArgs + @("build","vcpkg-hello-world-1","--host-triplet",$Triplet)) | ||
Throw-IfFailed | ||
|
||
# Regression test https://github.com/microsoft/vcpkg/issues/13933 | ||
Run-Vcpkg -TestArgs ($commonArgs + @("install","vcpkg-hello-world-1","--host-triplet",$Triplet)) | ||
Throw-IfFailed | ||
$out = (Run-Vcpkg -TestArgs ($commonArgs + @("build","vcpkg-hello-world-1","--host-triplet",$Triplet)) | Out-String) | ||
Throw-IfNotFailed | ||
if ($out -notmatch "is already installed; please remove") | ||
{ | ||
$out | ||
throw "Expected to fail due to already being installed" | ||
} |
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
Oops, something went wrong.