-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/microsoft/vcpkg-tool into t…
…hread-safe-print
- Loading branch information
Showing
219 changed files
with
7,464 additions
and
6,799 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
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
1 change: 1 addition & 0 deletions
1
azure-pipelines/e2e-ports/hash-additional-fail/additional_abi_file.txt
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 @@ | ||
Just for testing! |
9 changes: 9 additions & 0 deletions
9
azure-pipelines/e2e-ports/hash-additional-fail/hash-additional-e2e.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,9 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
if(APPLE) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin) | ||
elseif(UNIX) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Linux) | ||
endif() | ||
set(VCPKG_HASH_ADDITIONAL_FILES "additional_abi_file.txt") # relatives path should fail. |
3 changes: 3 additions & 0 deletions
3
azure-pipelines/e2e-ports/hash-additional-fail/vcpkg-test-hash-additional/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,3 @@ | ||
# should fail earlier than running the portfile | ||
|
||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e-ports/hash-additional-fail/vcpkg-test-hash-additional/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": "vcpkg-test-hash-additional", | ||
"version": "0", | ||
"description": "" | ||
} |
1 change: 1 addition & 0 deletions
1
azure-pipelines/e2e-ports/hash-additional/additional_abi_file.txt
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 @@ | ||
Just for testing! |
9 changes: 9 additions & 0 deletions
9
azure-pipelines/e2e-ports/hash-additional/hash-additional-e2e.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,9 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE dynamic) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
if(APPLE) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Darwin) | ||
elseif(UNIX) | ||
set(VCPKG_CMAKE_SYSTEM_NAME Linux) | ||
endif() | ||
set(VCPKG_HASH_ADDITIONAL_FILES "${CMAKE_CURRENT_LIST_DIR}/additional_abi_file.txt") |
12 changes: 12 additions & 0 deletions
12
azure-pipelines/e2e-ports/hash-additional/vcpkg-test-hash-additional/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,12 @@ | ||
file(STRINGS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}.vcpkg_abi_info.txt" lines) | ||
list(GET lines 0 first_line) | ||
|
||
set(expected "additional_file_0 61ba0c7fc1f696e28c1b7aa9460980a571025ff8c97bb90a57e990463aa25660") | ||
|
||
if(first_line STREQUAL "${expected}") | ||
message(STATUS "Test succesful!") | ||
else() | ||
message(FATAL_ERROR "First line in abi info is not the additional file to be hashed but:\n first_line: '${first_line}'\n expected: '${expected}' ") | ||
endif() | ||
|
||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e-ports/hash-additional/vcpkg-test-hash-additional/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": "vcpkg-test-hash-additional", | ||
"version": "0", | ||
"description": "A port that inspects the abi" | ||
} |
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e-ports/vcpkg-e2e-test-fails-in-download-only-transitive/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,4 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "copyright message") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/installed.txt" "${PORT} installed") |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e-ports/vcpkg-e2e-test-fails-in-download-only-transitive/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": "vcpkg-e2e-test-fails-in-download-only-transitive", | ||
"version": "1.0.0", | ||
"dependencies": [ "vcpkg-e2e-test-fails-in-download-only" ] | ||
} |
8 changes: 8 additions & 0 deletions
8
azure-pipelines/e2e-ports/vcpkg-e2e-test-fails-in-download-only/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,8 @@ | ||
if(DEFINED VCPKG_DOWNLOAD_MODE) | ||
message(FATAL_ERROR "This port does not compile in download mode") | ||
endif() | ||
|
||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "copyright message") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/installed.txt" "${PORT} installed") |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e-ports/vcpkg-e2e-test-fails-in-download-only/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": "vcpkg-e2e-test-fails-in-download-only", | ||
"version": "1.0.0", | ||
"dependencies": ["vcpkg-internal-e2e-test-port"] | ||
} |
3 changes: 3 additions & 0 deletions
3
azure-pipelines/e2e-ports/vcpkg-internal-e2e-test-port/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 |
---|---|---|
@@ -1 +1,4 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "copyright message") | ||
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/installed.txt" "${PORT} installed") |
14 changes: 14 additions & 0 deletions
14
azure-pipelines/e2e-ports/vcpkg-test-x-script/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,14 @@ | ||
# This port is for testing that x-script works; see test-script-asset-cache.c | ||
vcpkg_download_distfile( | ||
SOURCE_PATH | ||
URLS https://example.com/hello-world.txt | ||
SHA512 09E1E2A84C92B56C8280F4A1203C7CFFD61B162CFE987278D4D6BE9AFBF38C0E8934CDADF83751F4E99D111352BFFEFC958E5A4852C8A7A29C95742CE59288A8 | ||
FILENAME hello-world.txt | ||
) | ||
|
||
file(READ "${SOURCE_PATH}" CONTENTS) | ||
if (NOT CONTENTS STREQUAL "Hello, world!\n") | ||
message(FATAL_ERROR "Downloaded file has incorrect contents: ${CONTENTS}") | ||
endif() | ||
|
||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
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,4 @@ | ||
{ | ||
"name": "vcpkg-test-x-script", | ||
"version-string": "1.0.0" | ||
} |
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 @@ | ||
. $PSScriptRoot/../end-to-end-tests-prelude.ps1 | ||
|
||
Refresh-TestRoot | ||
Run-Vcpkg -TestArgs ($commonArgs + @('fetch', 'cmake')) | ||
Run-Vcpkg -TestArgs ($commonArgs + @("install", "vcpkg-test-x-script", "--x-binarysource=clear", "--overlay-ports=$PSScriptRoot/../e2e-ports", "--x-asset-sources=x-script,$TestScriptAssetCacheExe {url} {sha512} {dst};x-block-origin")) | ||
Throw-IfFailed |
Oops, something went wrong.