2021-05-27 14:24:11 +02:00
#!/bin/bash -eu
2021-05-26 11:50:03 +02:00
2021-08-14 02:56:53 +02:00
ROOT = $( pwd )
RUNTIME = ${ ROOT } /youki
2021-05-26 11:50:03 +02:00
cd integration_test/src/github.com/opencontainers/runtime-tools
2021-08-14 02:56:53 +02:00
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"
"linux_cgroups_cpus/linux_cgroups_cpus.t"
"linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.t"
"linux_cgroups_relative_devices/linux_cgroups_relative_devices.t"
"linux_cgroups_relative_hugetlb/linux_cgroups_relative_hugetlb.t"
"linux_cgroups_relative_memory/linux_cgroups_relative_memory.t"
"linux_cgroups_relative_network/linux_cgroups_relative_network.t"
"linux_cgroups_relative_pids/linux_cgroups_relative_pids.t"
"create/create.t"
"kill/kill.t"
"delete/delete.t"
"state/state.t"
"linux_sysctl/linux_sysctl.t"
"hooks/hooks.t"
"prestart/prestart.t"
"prestart_fail/prestart_fail.t"
"poststart/poststart.t"
"poststart_fail/poststart_fail.t"
"poststop/poststop.t"
"hooks_stdin/hooks_stdin.t"
)
2021-06-30 08:20:41 +02:00
# Record the tests that runc also fails to pass below, maybe we will fix this by origin integration test, issue: https://github.com/containers/youki/issues/56
# no_paas_test_case=("start/start.t")
2021-05-26 11:50:03 +02:00
for case in " ${ test_cases [@] } " ; do
echo " Running $case "
2021-08-14 02:56:53 +02:00
if [ 0 -ne $( sudo RUST_BACKTRACE = 1 YOUKI_LOG_LEVEL = debug RUNTIME = ${ RUNTIME } ${ ROOT } /integration_test/src/github.com/opencontainers/runtime-tools/validation/$case | grep "not ok" | wc -l) ] ; then
2021-05-26 11:50:03 +02:00
exit 1
fi
2021-05-30 11:30:40 +02:00
sleep 1
2021-05-26 11:50:03 +02:00
done