Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make sure integration tests complete in ubuntu 20.04 enviroment. #206

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions integration_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@ test_cases=(
# "start/start.t"
"state/state.t"
)

check_enviroment() {
test_case=$1
if [[ $test_case =~ .*(memory|hugetlb).t ]]; then
if [[ ! -e "/sys/fs/cgroup/memory/memory.memsw.limit_in_bytes" ]]; then
return 1
fi
fi
}

for case in "${test_cases[@]}"; do
if [[ ! -e "${ROOT}/integration_test/src/github.com/opencontainers/runtime-tools/validation/$case" ]]; then
GOPATH=${ROOT}/integration_test make runtimetest validation-executables
Expand All @@ -74,6 +84,11 @@ done


for case in "${test_cases[@]}"; do
if ! check_enviroment $case; then
echo "Skip $case bacause your enviroment doesn't support this test case"
continue
fi

echo "Running $case"
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
exit 1
Expand Down