Skip to content

Commit

Permalink
Fix hash-addtional-files tests (#1388)
Browse files Browse the repository at this point in the history
Problems were:
- the only test in e2e_ports folder, everything else in e2e-ports
- tests modify files under $VCPKG_ROOT
- Divided in two files where one enough
- Tests fail if package is already in binary cache
  • Loading branch information
autoantwort authored Apr 20, 2024
1 parent 1603ecb commit 7b0cdcf
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 8 deletions.
7 changes: 0 additions & 7 deletions azure-pipelines/end-to-end-tests-dir/hash-additional-fail.ps1

This file was deleted.

10 changes: 9 additions & 1 deletion azure-pipelines/end-to-end-tests-dir/hash-additional.ps1
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
. $PSScriptRoot/../end-to-end-tests-prelude.ps1
Run-Vcpkg "--overlay-triplets=$PSScriptRoot/../e2e_ports/hash-additional" "--overlay-ports=$PSScriptRoot/../e2e_ports/hash-additional" install vcpkg-test-hash-additional --triplet hash-additional-e2e

Run-Vcpkg @directoryArgs "--overlay-triplets=$PSScriptRoot/../e2e-ports/hash-additional" "--overlay-ports=$PSScriptRoot/../e2e-ports/hash-additional" x-set-installed vcpkg-test-hash-additional --triplet hash-additional-e2e --binarysource=clear
Throw-IfFailed

$output = Run-VcpkgAndCaptureOutput @directoryArgs "--overlay-triplets=$PSScriptRoot/../e2e-ports/hash-additional-fail" "--overlay-ports=$PSScriptRoot/../e2e-ports/hash-additional-fail" x-set-installed vcpkg-test-hash-additional --triplet hash-additional-e2e --binarysource=clear
Throw-IfNotFailed
if ($output -notmatch "Variable VCPKG_HASH_ADDITIONAL_FILES contains invalid file path")
{
throw "Expected to fail since VCPKG_HASH_ADDITIONAL_FILES is set to a relative path"
}

0 comments on commit 7b0cdcf

Please sign in to comment.