diff --git a/.github/workflows/build-checks-preview-riscv64.yaml b/.github/workflows/build-checks-preview-riscv64.yaml index 25d11b741b..69f872d3f1 100644 --- a/.github/workflows/build-checks-preview-riscv64.yaml +++ b/.github/workflows/build-checks-preview-riscv64.yaml @@ -106,6 +106,10 @@ jobs: run: | XDG_RUNTIME_DIR=$(mktemp -d "/tmp/kata-tests-$USER.XXX" | tee >(xargs chmod 0700)) echo "XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}" >> "$GITHUB_ENV" + - name: Skip tests that depend on virtualization capable runners when needed + if: inputs.instance == 'riscv-builder' + run: | + echo "GITHUB_RUNNER_CI_NON_VIRT=true" >> "$GITHUB_ENV" - name: Running `${{ matrix.command }}` for ${{ matrix.component.name }} run: | cd ${{ matrix.component.path }} diff --git a/src/runtime/cmd/kata-runtime/kata-check_riscv64_test.go b/src/runtime/cmd/kata-runtime/kata-check_riscv64_test.go index 28e419a2a2..ce76915ac9 100644 --- a/src/runtime/cmd/kata-runtime/kata-check_riscv64_test.go +++ b/src/runtime/cmd/kata-runtime/kata-check_riscv64_test.go @@ -22,6 +22,10 @@ func setupCheckHostIsVMContainerCapable(assert *assert.Assertions, cpuInfoFile s } func TestCCCheckCLIFunction(t *testing.T) { + if os.Getenv("GITHUB_RUNNER_CI_NON_VIRT") == "true" { + t.Skip("Skipping the test as the GitHub self hosted runners for RISC-V do not support Virtualization") + } + var cpuData []testCPUData moduleData := []testModuleData{ {filepath.Join(sysModuleDir, "kvm"), "", true},