Skip to content

Commit

Permalink
test.ps1: More diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
lilith committed Feb 7, 2025
1 parent 3776f38 commit 69abf72
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions tests/Imageflow.TestWebAOT/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,27 @@ Remove-Item -Recurse -Force ./obj -ErrorAction SilentlyContinue
Set-Location ../../src/

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

# List, recursively, all files in the .nuget/packages/imageflow.nativeruntime.* directories, flattened to just files ending in .dll, .so, .dylib, .a, .lib
$nativeRuntimeFiles = Get-ChildItem -Path ~/.nuget/packages/imageflow.nativeruntime.* -Recurse | Where-Object { $_.Extension -in '.dll', '.so', '.dylib', '.a', '.lib' }
try{
# List, recursively, all files in the .nuget/packages/imageflow.nativeruntime.* directories, flattened to just files ending in .dll, .so, .dylib, .a, .lib
$nativeRuntimeFiles = Get-ChildItem -Path ~/.nuget/packages/imageflow.nativeruntime.* -Recurse -ErrorAction SilentlyContinue | Where-Object { $_.Extension -in '.dll', '.so', '.dylib', '.a', '.lib' }

# Map them to simple full paths
$nativeRuntimeFiles = $nativeRuntimeFiles | ForEach-Object { $_.FullName }

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

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



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


Expand Down

0 comments on commit 69abf72

Please sign in to comment.