mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 03:42:09 +00:00
ci: Skip tests depend on virtualization on riscv64
`VMContainerCapable` requires a present `kvm` device, which is not yet available in our RISC-V runners. Skipped related tests if it is running on `riscv-builder`. Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
parent
7f0b1946c5
commit
46caa986bb
@ -106,6 +106,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: inputs.instance == 'riscv-builder'
|
||||||
|
run: |
|
||||||
|
echo "GITHUB_RUNNER_CI_NON_VIRT=true" >> "$GITHUB_ENV"
|
||||||
- name: Running `${{ matrix.command }}` for ${{ matrix.component.name }}
|
- name: Running `${{ matrix.command }}` for ${{ matrix.component.name }}
|
||||||
run: |
|
run: |
|
||||||
cd ${{ matrix.component.path }}
|
cd ${{ matrix.component.path }}
|
||||||
|
@ -22,6 +22,10 @@ func setupCheckHostIsVMContainerCapable(assert *assert.Assertions, cpuInfoFile s
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCCCheckCLIFunction(t *testing.T) {
|
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
|
var cpuData []testCPUData
|
||||||
moduleData := []testModuleData{
|
moduleData := []testModuleData{
|
||||||
{filepath.Join(sysModuleDir, "kvm"), "", true},
|
{filepath.Join(sysModuleDir, "kvm"), "", true},
|
||||||
|
Loading…
Reference in New Issue
Block a user