Skip to content

Commit 69abf72

Browse files
committed
test.ps1: More diagnostics
1 parent 3776f38 commit 69abf72

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

tests/Imageflow.TestWebAOT/test.ps1

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,27 @@ Remove-Item -Recurse -Force ./obj -ErrorAction SilentlyContinue
2323
Set-Location ../../src/
2424

2525
# First, let's restore the solution
26-
dotnet restore -v diag ../tests/Imageflow.TestWebAOT/Imageflow.TestWebAOT.csproj -r $targetArchitecture
26+
dotnet restore -v d ../tests/Imageflow.TestWebAOT/Imageflow.TestWebAOT.csproj -r $targetArchitecture
2727

28-
# List, recursively, all files in the .nuget/packages/imageflow.nativeruntime.* directories, flattened to just files ending in .dll, .so, .dylib, .a, .lib
29-
$nativeRuntimeFiles = Get-ChildItem -Path ~/.nuget/packages/imageflow.nativeruntime.* -Recurse | Where-Object { $_.Extension -in '.dll', '.so', '.dylib', '.a', '.lib' }
28+
try{
29+
# List, recursively, all files in the .nuget/packages/imageflow.nativeruntime.* directories, flattened to just files ending in .dll, .so, .dylib, .a, .lib
30+
$nativeRuntimeFiles = Get-ChildItem -Path ~/.nuget/packages/imageflow.nativeruntime.* -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.Extension -in '.dll', '.so', '.dylib', '.a', '.lib' }
31+
32+
# Map them to simple full paths
33+
$nativeRuntimeFiles = $nativeRuntimeFiles | ForEach-Object { $_.FullName }
3034

31-
# Map them to simple full paths
32-
$nativeRuntimeFiles = $nativeRuntimeFiles | ForEach-Object { $_.FullName }
35+
# print the files
36+
Write-Output "Native runtime files in .nuget/packages/imageflow.nativeruntime.*:"
37+
Write-Output $nativeRuntimeFiles
38+
} catch {
39+
Write-Error "Failed to list native runtime files. Skipping."
40+
}
3341

34-
# print the files
35-
Write-Output "Native runtime files in .nuget/packages/imageflow.nativeruntime.*:"
36-
Write-Output $nativeRuntimeFiles
3742

3843

3944

4045
# Then publish the project
41-
dotnet publish --force -v diag -c Release ../tests/Imageflow.TestWebAOT/Imageflow.TestWebAOT.csproj -o $scriptPath/test-publish -r $targetArchitecture
46+
dotnet publish --force -v d -c Release ../tests/Imageflow.TestWebAOT/Imageflow.TestWebAOT.csproj -o $scriptPath/test-publish -r $targetArchitecture
4247
# if the above fails, exit with a non-zero exit code.
4348

4449

0 commit comments

Comments
 (0)