github.com/containers/podman/v4@v4.9.4/contrib/cirrus/win-podman-machine-test.ps1 (about) 1 #!/usr/bin/env powershell 2 3 . $PSScriptRoot\win-lib.ps1 4 5 Write-Host "Recovering env. vars." 6 Import-CLIXML "$ENV:TEMP\envars.xml" | % { 7 Write-Host " $($_.Name) = $($_.Value)" 8 Set-Item "Env:$($_.Name)" "$($_.Value)" 9 } 10 11 if ($Env:TEST_FLAVOR -eq "machine-wsl") { 12 # FIXME: Test-modes should be definitively set and positively asserted. 13 # Otherwise if the var. goes out-of-scope, defaults change, or definition 14 # fails: Suddenly assumed behavior != actual behaviorr, esp. if/when only 15 # quickly glancing at a green status check-mark. 16 $Env:CONTAINERS_MACHINE_PROVIDER = "" # IMPLIES WSL 17 } elseif ($Env:TEST_FLAVOR -eq "machine-hyperv") { 18 $Env:CONTAINERS_MACHINE_PROVIDER = "hyperv" 19 } else { 20 Write-Host "Unsupported value for `$TEST_FLAVOR '$Env:TEST_FLAVOR'" 21 Exit 1 22 } 23 # Make sure an observer knows the value of this critical variable (consumed by tests). 24 Write-Host " CONTAINERS_MACHINE_PROVIDER = $Env:CONTAINERS_MACHINE_PROVIDER" 25 Write-Host "`n" 26 27 # The repo.tbz artifact was extracted here 28 Set-Location "$ENV:CIRRUS_WORKING_DIR\repo" 29 # Tests hard-code this location for podman-remote binary, make sure it actually runs. 30 Run-Command ".\bin\windows\podman.exe --version" 31 32 Write-Host "`nRunning podman-machine e2e tests" 33 Run-Command ".\winmake localmachine"