mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-02 02:02:24 +00:00
Merge pull request #10950 from fidencio/topic/skip-arm-check-tests-that-depend-on-virt
ci: arm64: Skip tests that depend on virt on non-virt capable runners
This commit is contained in:
commit
96ed706d20
4
.github/workflows/build-checks.yaml
vendored
4
.github/workflows/build-checks.yaml
vendored
@ -99,6 +99,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
XDG_RUNTIME_DIR=$(mktemp -d "/tmp/kata-tests-$USER.XXX" | tee >(xargs chmod 0700))
|
XDG_RUNTIME_DIR=$(mktemp -d "/tmp/kata-tests-$USER.XXX" | tee >(xargs chmod 0700))
|
||||||
echo "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}" >> "$GITHUB_ENV"
|
echo "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}" >> "$GITHUB_ENV"
|
||||||
|
- name: Skip tests that depend on virtualization capable runners when needed
|
||||||
|
if: ${{ endsWith(inputs.instance, '-arm') }}
|
||||||
|
run: |
|
||||||
|
echo "GITHUB_RUNNER_CI_ARM64=true" >> "$GITHUB_ENV"
|
||||||
- name: Running `${{ matrix.command }}` for ${{ matrix.component }}
|
- name: Running `${{ matrix.command }}` for ${{ matrix.component }}
|
||||||
run: |
|
run: |
|
||||||
cd ${{ matrix.component-path }}
|
cd ${{ matrix.component-path }}
|
||||||
|
@ -25,6 +25,10 @@ func setupCheckHostIsVMContainerCapable(assert *assert.Assertions, cpuInfoFile s
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCCCheckCLIFunction(t *testing.T) {
|
func TestCCCheckCLIFunction(t *testing.T) {
|
||||||
|
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
|
||||||
|
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
|
||||||
|
}
|
||||||
|
|
||||||
var cpuData []testCPUData
|
var cpuData []testCPUData
|
||||||
moduleData := []testModuleData{
|
moduleData := []testModuleData{
|
||||||
{filepath.Join(sysModuleDir, "kvm"), "", true},
|
{filepath.Join(sysModuleDir, "kvm"), "", true},
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,5 +18,8 @@ func getExpectedHostDetails(tmpdir string) (HostInfo, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEnvGetEnvInfoSetsCPUType(t *testing.T) {
|
func TestEnvGetEnvInfoSetsCPUType(t *testing.T) {
|
||||||
|
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
|
||||||
|
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
|
||||||
|
}
|
||||||
testEnvGetEnvInfoSetsCPUTypeGeneric(t)
|
testEnvGetEnvInfoSetsCPUTypeGeneric(t)
|
||||||
}
|
}
|
||||||
|
@ -375,6 +375,10 @@ func TestEnvGetMetaInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEnvGetHostInfo(t *testing.T) {
|
func TestEnvGetHostInfo(t *testing.T) {
|
||||||
|
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
|
||||||
|
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
|
||||||
|
}
|
||||||
|
|
||||||
tmpdir := t.TempDir()
|
tmpdir := t.TempDir()
|
||||||
|
|
||||||
expectedHostDetails, err := getExpectedHostDetails(tmpdir)
|
expectedHostDetails, err := getExpectedHostDetails(tmpdir)
|
||||||
@ -435,6 +439,10 @@ func TestEnvGetHostInfoNoProcVersion(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEnvGetEnvInfo(t *testing.T) {
|
func TestEnvGetEnvInfo(t *testing.T) {
|
||||||
|
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
|
||||||
|
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
|
||||||
|
}
|
||||||
|
|
||||||
tmpdir := t.TempDir()
|
tmpdir := t.TempDir()
|
||||||
|
|
||||||
// Run test twice to ensure the individual component debug+trace
|
// Run test twice to ensure the individual component debug+trace
|
||||||
@ -463,6 +471,10 @@ func TestEnvGetEnvInfo(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestEnvGetEnvInfoNoHypervisorVersion(t *testing.T) {
|
func TestEnvGetEnvInfoNoHypervisorVersion(t *testing.T) {
|
||||||
|
if os.Getenv("GITHUB_RUNNER_CI_ARM64") == "true" {
|
||||||
|
t.Skip("Skipping the test as the GitHub self hosted runners for ARM64 do not support Virtualization")
|
||||||
|
}
|
||||||
|
|
||||||
assert := assert.New(t)
|
assert := assert.New(t)
|
||||||
|
|
||||||
tmpdir := t.TempDir()
|
tmpdir := t.TempDir()
|
||||||
|
Loading…
Reference in New Issue
Block a user