Skip to content

Commit 254c842

Browse files
committed
test: build case-collision fixture with full bsdtar
1 parent d1630e6 commit 254c842

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/msys-pacman-source.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
run: |
5757
./tests/pacman/msys-runtime-smoke.ps1 `
5858
-WorkDirectory (Join-Path $env:RUNNER_TEMP "vitasdk-ñ-日本語 path") `
59+
-FixtureTar (Get-Command bsdtar.exe -ErrorAction Stop).Source `
5960
-PacmanExecutable (Join-Path $env:RUNNER_TEMP "vitasdk-pacman/pacman.exe") `
6061
-RuntimeDll (Join-Path $env:RUNNER_TEMP "vitasdk-pacman/msys-2.0.dll") `
6162
-Extended

tests/pacman/msys-runtime-smoke.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
param(
22
[string]$WorkDirectory = (Join-Path $env:TEMP "vitasdk-msys-pacman-smoke"),
33
[string]$FixtureDirectory = (Join-Path $env:TEMP "vitasdk-msys-pacman-fixtures-${PID}"),
4+
[string]$FixtureTar = "tar.exe",
45
[string]$PacmanExecutable = "",
56
[string]$RuntimeDll = "",
67
[switch]$Extended
@@ -83,7 +84,7 @@ function New-ProbePackage(
8384
Invoke-Checked "tar.exe" (@("-cJf", $Output, "-C", $Root) + $archiveEntries)
8485
}
8586

86-
function New-CaseCollisionPackage([string]$Root, [string]$Output) {
87+
function New-CaseCollisionPackage([string]$Root, [string]$Output, [string]$TarProgram) {
8788
if (Test-Path $Root) {
8889
Remove-Item -Recurse -Force $Root
8990
}
@@ -97,7 +98,7 @@ function New-CaseCollisionPackage([string]$Root, [string]$Output) {
9798

9899
# The source paths are distinct on Windows. Rewrite them only while adding
99100
# them to the archive so the payload contains two case-folding equivalents.
100-
Invoke-Checked "tar.exe" @(
101+
Invoke-Checked $TarProgram @(
101102
"-cJf", $Output,
102103
"-s", "|^upper/|arm-vita-eabi/include/case-probe/|",
103104
"-s", "|^lower/|arm-vita-eabi/include/case-probe/|",
@@ -283,7 +284,7 @@ try {
283284
throw "upgrade did not install its new file"
284285
}
285286

286-
New-CaseCollisionPackage $collisionRoot $collisionPath
287+
New-CaseCollisionPackage $collisionRoot $collisionPath $FixtureTar
287288
Invoke-ExpectedFailure $pacman ($commonArguments + @(
288289
"--upgrade", "--noscriptlet", "--noconfirm", (Get-MixedPath $collisionPath)
289290
)) "package containing case-insensitive duplicate paths"

0 commit comments

Comments
 (0)