mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #21564 from cevich/enforcing_win_tests_again
Enable windows and PM windows testing
This commit is contained in:
168
.cirrus.yml
168
.cirrus.yml
@ -363,10 +363,10 @@ alt_build_task:
|
|||||||
matrix:
|
matrix:
|
||||||
- env:
|
- env:
|
||||||
ALT_NAME: 'Build Each Commit'
|
ALT_NAME: 'Build Each Commit'
|
||||||
#- env:
|
- env:
|
||||||
# # TODO: Replace with task using `winmake` to build
|
# TODO: Replace with task using `winmake` to build
|
||||||
# # binary and archive installation zip file.
|
# binary and archive installation zip file.
|
||||||
# ALT_NAME: 'Windows Cross'
|
ALT_NAME: 'Windows Cross'
|
||||||
- env:
|
- env:
|
||||||
ALT_NAME: 'Alt Arch. x86 Cross'
|
ALT_NAME: 'Alt Arch. x86 Cross'
|
||||||
- env:
|
- env:
|
||||||
@ -387,58 +387,58 @@ alt_build_task:
|
|||||||
always: *runner_stats
|
always: *runner_stats
|
||||||
|
|
||||||
|
|
||||||
#win_installer_task:
|
win_installer_task:
|
||||||
# name: "Verify Win Installer Build"
|
name: "Verify Win Installer Build"
|
||||||
# alias: win_installer
|
alias: win_installer
|
||||||
# only_if: # RHEL never releases podman windows installer binary
|
only_if: # RHEL never releases podman windows installer binary
|
||||||
# $CIRRUS_TAG == '' &&
|
$CIRRUS_TAG == '' &&
|
||||||
# $CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
$CIRRUS_BRANCH !=~ 'v[0-9\.]+-rhel' &&
|
||||||
# $CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
$CIRRUS_BASE_BRANCH !=~ 'v[0-9\.]+-rhel'
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - alt_build
|
- alt_build
|
||||||
# ec2_instance: &windows
|
ec2_instance: &windows
|
||||||
# image: "${WINDOWS_AMI}"
|
image: "${WINDOWS_AMI}"
|
||||||
# type: m5.large
|
type: m5.large
|
||||||
# region: us-east-1
|
region: us-east-1
|
||||||
# platform: windows
|
platform: windows
|
||||||
# env: &winenv
|
env: &winenv
|
||||||
# CIRRUS_WORKING_DIR: &wincwd "${LOCALAPPDATA}\\cirrus-ci-build"
|
CIRRUS_WORKING_DIR: &wincwd "${LOCALAPPDATA}\\cirrus-ci-build"
|
||||||
# CIRRUS_SHELL: powershell
|
CIRRUS_SHELL: powershell
|
||||||
# PATH: "${PATH};C:\\ProgramData\\chocolatey\\bin"
|
PATH: "${PATH};C:\\ProgramData\\chocolatey\\bin"
|
||||||
# DISTRO_NV: "windows"
|
DISTRO_NV: "windows"
|
||||||
# PRIV_NAME: "rootless"
|
PRIV_NAME: "rootless"
|
||||||
# # Fake version, we are only testing the installer functions, so version doesn't matter
|
# Fake version, we are only testing the installer functions, so version doesn't matter
|
||||||
# WIN_INST_VER: 9.9.9
|
WIN_INST_VER: 9.9.9
|
||||||
# # It's HIGHLY desireable to use the same binary throughout CI. Otherwise, if
|
# It's HIGHLY desireable to use the same binary throughout CI. Otherwise, if
|
||||||
# # there's a toolchain or build-environment specific problem, it can be incredibly
|
# there's a toolchain or build-environment specific problem, it can be incredibly
|
||||||
# # difficult (and non-obvious) to debug.
|
# difficult (and non-obvious) to debug.
|
||||||
# clone_script: &winclone |
|
clone_script: &winclone |
|
||||||
# $ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
# $ProgressPreference = 'SilentlyContinue'
|
$ProgressPreference = 'SilentlyContinue'
|
||||||
# New-Item -ItemType Directory -Force -Path "$ENV:CIRRUS_WORKING_DIR"
|
New-Item -ItemType Directory -Force -Path "$ENV:CIRRUS_WORKING_DIR"
|
||||||
# Set-Location "$ENV:CIRRUS_WORKING_DIR"
|
Set-Location "$ENV:CIRRUS_WORKING_DIR"
|
||||||
# $uri = "${ENV:ART_URL}/Windows Cross/repo/repo.tbz"
|
$uri = "${ENV:ART_URL}/Windows Cross/repo/repo.tbz"
|
||||||
# Write-Host "Downloading $uri"
|
Write-Host "Downloading $uri"
|
||||||
# For($i = 0;;) {
|
For($i = 0;;) {
|
||||||
# Try {
|
Try {
|
||||||
# Invoke-WebRequest -UseBasicParsing -ErrorAction Stop -OutFile "repo.tbz2" `
|
Invoke-WebRequest -UseBasicParsing -ErrorAction Stop -OutFile "repo.tbz2" `
|
||||||
# -Uri "$uri"
|
-Uri "$uri"
|
||||||
# Break
|
Break
|
||||||
# } Catch {
|
} Catch {
|
||||||
# if (++$i -gt 6) {
|
if (++$i -gt 6) {
|
||||||
# throw $_.Exception
|
throw $_.Exception
|
||||||
# }
|
}
|
||||||
# Write-Host "Download failed - retrying:" $_.Exception.Response.StatusCode
|
Write-Host "Download failed - retrying:" $_.Exception.Response.StatusCode
|
||||||
# Start-Sleep -Seconds 10
|
Start-Sleep -Seconds 10
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
# arc unarchive repo.tbz2 .\
|
arc unarchive repo.tbz2 .\
|
||||||
# if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
# throw "Unarchive repo.tbz2 failed"
|
throw "Unarchive repo.tbz2 failed"
|
||||||
# Exit 1
|
Exit 1
|
||||||
# }
|
}
|
||||||
# Get-ChildItem -Path .\repo
|
Get-ChildItem -Path .\repo
|
||||||
# main_script: ".\\repo\\contrib\\cirrus\\win-installer-main.ps1"
|
main_script: ".\\repo\\contrib\\cirrus\\win-installer-main.ps1"
|
||||||
|
|
||||||
|
|
||||||
# Confirm building the remote client, natively on a Mac OS-X VM.
|
# Confirm building the remote client, natively on a Mac OS-X VM.
|
||||||
@ -774,32 +774,32 @@ podman_machine_aarch64_task:
|
|||||||
always: *int_logs_artifacts
|
always: *int_logs_artifacts
|
||||||
|
|
||||||
|
|
||||||
#podman_machine_windows_task:
|
podman_machine_windows_task:
|
||||||
# name: *std_name_fmt
|
name: *std_name_fmt
|
||||||
# alias: podman_machine_windows
|
alias: podman_machine_windows
|
||||||
# # Only run for non-docs/copr PRs and non-release branch builds
|
# Only run for non-docs/copr PRs and non-release branch builds
|
||||||
# # and never for tags. Docs: ./contrib/cirrus/CIModes.md
|
# and never for tags. Docs: ./contrib/cirrus/CIModes.md
|
||||||
# only_if: *machine_cron_not_tag_build_docs
|
only_if: *machine_cron_not_tag_build_docs
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - alt_build
|
- alt_build
|
||||||
# - build
|
- build
|
||||||
# - win_installer
|
- win_installer
|
||||||
# - local_integration_test
|
- local_integration_test
|
||||||
# - remote_integration_test
|
- remote_integration_test
|
||||||
# - container_integration_test
|
- container_integration_test
|
||||||
# - rootless_integration_test
|
- rootless_integration_test
|
||||||
# ec2_instance:
|
ec2_instance:
|
||||||
# <<: *windows
|
<<: *windows
|
||||||
# type: m5zn.metal
|
type: m5zn.metal
|
||||||
# platform: windows
|
platform: windows
|
||||||
# env: *winenv
|
env: *winenv
|
||||||
# matrix:
|
matrix:
|
||||||
# #- env:
|
#- env:
|
||||||
# # TEST_FLAVOR: "machine-wsl"
|
# TEST_FLAVOR: "machine-wsl"
|
||||||
# - env:
|
- env:
|
||||||
# TEST_FLAVOR: "machine-hyperv"
|
TEST_FLAVOR: "machine-hyperv"
|
||||||
# clone_script: *winclone
|
clone_script: *winclone
|
||||||
# main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1"
|
main_script: ".\\repo\\contrib\\cirrus\\win-podman-machine-main.ps1"
|
||||||
|
|
||||||
|
|
||||||
podman_machine_mac_task:
|
podman_machine_mac_task:
|
||||||
@ -1077,7 +1077,7 @@ success_task:
|
|||||||
- alt_build
|
- alt_build
|
||||||
- osx_alt_build
|
- osx_alt_build
|
||||||
- freebsd_alt_build
|
- freebsd_alt_build
|
||||||
#- win_installer
|
- win_installer
|
||||||
- docker-py_test
|
- docker-py_test
|
||||||
- unit_test
|
- unit_test
|
||||||
- apiv2_test
|
- apiv2_test
|
||||||
@ -1088,7 +1088,7 @@ success_task:
|
|||||||
- rootless_integration_test
|
- rootless_integration_test
|
||||||
- podman_machine
|
- podman_machine
|
||||||
- podman_machine_aarch64
|
- podman_machine_aarch64
|
||||||
#- podman_machine_windows
|
- podman_machine_windows
|
||||||
- podman_machine_mac
|
- podman_machine_mac
|
||||||
- local_system_test
|
- local_system_test
|
||||||
- local_system_test_aarch64
|
- local_system_test_aarch64
|
||||||
|
@ -147,6 +147,11 @@ func setup() (string, *machineTestBuilder) {
|
|||||||
if err := os.Setenv("HOME", homeDir); err != nil {
|
if err := os.Setenv("HOME", homeDir); err != nil {
|
||||||
Fail("failed to set home dir")
|
Fail("failed to set home dir")
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
if err := os.Setenv("USERPROFILE", homeDir); err != nil {
|
||||||
|
Fail("unable to set home dir on windows")
|
||||||
|
}
|
||||||
|
}
|
||||||
if err := os.Setenv("XDG_RUNTIME_DIR", homeDir); err != nil {
|
if err := os.Setenv("XDG_RUNTIME_DIR", homeDir); err != nil {
|
||||||
Fail("failed to set xdg_runtime dir")
|
Fail("failed to set xdg_runtime dir")
|
||||||
}
|
}
|
||||||
@ -203,4 +208,9 @@ func teardown(origHomeDir string, testDir string, mb *machineTestBuilder) {
|
|||||||
if err := os.Setenv("HOME", origHomeDir); err != nil {
|
if err := os.Setenv("HOME", origHomeDir); err != nil {
|
||||||
Fail("failed to set home dir")
|
Fail("failed to set home dir")
|
||||||
}
|
}
|
||||||
|
if runtime.GOOS == "windows" {
|
||||||
|
if err := os.Setenv("USERPROFILE", origHomeDir); err != nil {
|
||||||
|
Fail("failed to set windows home dir back to original")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user