mirror of
https://github.com/containers/youki
synced 2024-11-22 17:02:00 +01:00
extract the integration tests writen in the ci file as a script file.
This commit is contained in:
parent
e264d20d8b
commit
a12092eccc
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@ -33,22 +33,5 @@ jobs:
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: "1.11.0"
|
||||
- name: Build runtime-tools
|
||||
run: |
|
||||
mkdir -p $(go env GOPATH)/src/github.com/opencontainers
|
||||
cd $(go env GOPATH)/src/github.com/opencontainers
|
||||
git clone https://github.com/opencontainers/runtime-tools
|
||||
cd runtime-tools
|
||||
make runtimetest validation-executables
|
||||
- name: Run intetgration tests
|
||||
run: |
|
||||
expect_err_num=8
|
||||
act_err_num=0
|
||||
cd $(go env GOPATH)/src/github.com/opencontainers/runtime-tools
|
||||
test_cases=("default/default.t" "linux_cgroups_devices/linux_cgroups_devices.t" "linux_cgroups_hugetlb/linux_cgroups_hugetlb.t" "linux_cgroups_pids/linux_cgroups_pids.t", "linux_cgroups_memory/linux_cgroups_memory.t", "linux_cgroups_network/linux_cgroups_network.t")
|
||||
for case in "${test_cases[@]}"; do
|
||||
title="Running $case"
|
||||
if [ 0 -ne $(sudo RUST_BACKTRACE=1 RUNTIME=$GITHUB_WORKSPACE/target/x86_64-unknown-linux-gnu/debug/youki ./validation/$case | grep "not ok" | wc -l) ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
run: ./integration_test.sh
|
||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "integration_test/src/github.com/opencontainers/runtime-tools"]
|
||||
path = integration_test/src/github.com/opencontainers/runtime-tools
|
||||
url = https://github.com/opencontainers/runtime-tools.git
|
12
integration_test.sh
Executable file
12
integration_test.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
root=$(pwd)
|
||||
cd integration_test/src/github.com/opencontainers/runtime-tools
|
||||
GOPATH=$root/integration_test make runtimetest validation-executables
|
||||
test_cases=("default/default.t" "linux_cgroups_devices/linux_cgroups_devices.t" "linux_cgroups_hugetlb/linux_cgroups_hugetlb.t" "linux_cgroups_pids/linux_cgroups_pids.t" "linux_cgroups_memory/linux_cgroups_memory.t" "linux_cgroups_network/linux_cgroups_network.t")
|
||||
for case in "${test_cases[@]}"; do
|
||||
echo "Running $case"
|
||||
if [ 0 -ne $(sudo RUST_BACKTRACE=1 RUNTIME=$root/target/x86_64-unknown-linux-gnu/debug/youki $root/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case | grep "not ok" | wc -l) ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
@ -0,0 +1 @@
|
||||
Subproject commit 59cdde06764be8d761db120664020f0415f36045
|
Loading…
Reference in New Issue
Block a user