Skip to content

Commit

Permalink
Improve output of integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Furisto committed Jul 6, 2021
1 parent e76360b commit 4c288c5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

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"
"linux_cgroups_cpus/linux_cgroups_cpus.t" "linux_cgroups_relative_cpus/linux_cgroups_relative_cpus.t"
Expand All @@ -13,8 +12,10 @@ test_cases=("default/default.t" "linux_cgroups_devices/linux_cgroups_devices.t"
# no_paas_test_case=("start/start.t")
for case in "${test_cases[@]}"; do
echo "Running $case"
if [ 0 -ne $(sudo RUST_BACKTRACE=1 YOUKI_LOG_LEVEL=debug RUNTIME=$root/youki $root/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case | grep "not ok" | wc -l) ]; then
output=$(sudo RUST_BACKTRACE=1 YOUKI_LOG_LEVEL=debug RUNTIME=$root/target/x86_64-unknown-linux-gnu/debug/youki $root/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case)
if [ 0 -ne $(echo $output | grep "not ok" | wc -l) ]; then
echo $output
exit 1
fi
sleep 1
done
done

0 comments on commit 4c288c5

Please sign in to comment.