-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check to ensure loaded port matches the declared version (#347)
* Add check to ensure loaded port matches the declared version * Dedupe errors. * Add end to end regression test. * Localize error * Remove e2e test dependency on Microsoft/vcpkg * Fixup localized error check. * Fix format-cxxcode on VS2022 machines, add message map. Co-authored-by: Billy Robert O'Neal III <[email protected]>
- Loading branch information
1 parent
5ba4532
commit dac008b
Showing
20 changed files
with
131 additions
and
9 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
13 changes: 13 additions & 0 deletions
13
azure-pipelines/e2e_ports/mismatched-version-database/vcpkg-configuration.json
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,13 @@ | ||
{ | ||
"default-registry": null, | ||
"registries": [ | ||
{ | ||
"kind": "filesystem", | ||
"path": "./vcpkg_registry", | ||
"packages": [ | ||
"arrow", | ||
"bloom-filter" | ||
] | ||
} | ||
] | ||
} |
15 changes: 15 additions & 0 deletions
15
azure-pipelines/e2e_ports/mismatched-version-database/vcpkg.json
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,15 @@ | ||
{ | ||
"name": "cycle-detected", | ||
"version": "0.1.0", | ||
"dependencies": [ | ||
"arrow", | ||
"bloom-filter" | ||
], | ||
"overrides": [ | ||
{ | ||
"name": "arrow", | ||
"version": "6.0.0.20210925", | ||
"port-version": 4 | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...pipelines/e2e_ports/mismatched-version-database/vcpkg_registry/ports/arrow/portfile.cmake
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 @@ | ||
// intentionally empty |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e_ports/mismatched-version-database/vcpkg_registry/ports/arrow/vcpkg.json
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,5 @@ | ||
{ | ||
"name": "arrow", | ||
"version": "6.0.0.20210925", | ||
"description": "Cross-language development platform for in-memory analytics" | ||
} |
1 change: 1 addition & 0 deletions
1
...es/e2e_ports/mismatched-version-database/vcpkg_registry/ports/bloom-filter/portfile.cmake
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 @@ | ||
// intentionally empty |
7 changes: 7 additions & 0 deletions
7
...elines/e2e_ports/mismatched-version-database/vcpkg_registry/ports/bloom-filter/vcpkg.json
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,7 @@ | ||
{ | ||
"name": "bloom-filter", | ||
"version": "0.2.0", | ||
"port-version": 1, | ||
"description": "bloom filter", | ||
"dependencies": ["arrow"] | ||
} |
9 changes: 9 additions & 0 deletions
9
azure-pipelines/e2e_ports/mismatched-version-database/vcpkg_registry/versions/a-/arrow.json
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"version": "6.0.0.20210925", | ||
"port-version": 4, | ||
"path": "$/ports/arrow" | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
...elines/e2e_ports/mismatched-version-database/vcpkg_registry/versions/b-/bloom-filter.json
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,9 @@ | ||
{ | ||
"versions": [ | ||
{ | ||
"version": "0.2.0", | ||
"port-version": 1, | ||
"path": "$/ports/bloom-filter" | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
azure-pipelines/e2e_ports/mismatched-version-database/vcpkg_registry/versions/baseline.json
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,13 @@ | ||
{ | ||
"$doc": "https://github.com/microsoft/vcpkg/blob/master/docs/maintainers/registries.md#filesystem-registries", | ||
"default": { | ||
"arrow": { | ||
"baseline": "6.0.0.20210925", | ||
"port-version": 4 | ||
}, | ||
"bloom-filter": { | ||
"baseline": "0.2.0", | ||
"port-version": 1 | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -71,12 +71,23 @@ Throw-IfFailed | |
$CurrentTest = "default baseline" | ||
$out = Run-Vcpkg @commonArgs "--feature-flags=versions" install --x-manifest-root=$versionFilesPath/default-baseline-1 2>&1 | Out-String | ||
Throw-IfNotFailed | ||
if ($out -notmatch ".*Error: while checking out baseline.*") | ||
if ($out -notmatch ".*Error: while checking out baseline\.*") | ||
{ | ||
$out | ||
throw "Expected to fail due to missing baseline" | ||
} | ||
|
||
$CurrentTest = "mismatched version database" | ||
$out = Run-Vcpkg @commonArgs "--feature-flags=versions" install --x-manifest-root="$PSScriptRoot/../e2e_ports/mismatched-version-database" 2>&1 | Out-String | ||
Throw-IfNotFailed | ||
if (($out -notmatch ".*Error: Failed to load port because version specs did not match*") -or | ||
($out -notmatch ".*Expected: [email protected]#4.*") -or | ||
($out -notmatch ".*Actual: [email protected].*")) | ||
{ | ||
$out | ||
throw "Expected to fail due to mismatched versions between portfile and the version database" | ||
} | ||
|
||
git -C "$env:VCPKG_ROOT" fetch https://github.com/vicroms/test-registries | ||
foreach ($opt_registries in @("",",registries")) | ||
{ | ||
|
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
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