forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·84 lines (71 loc) · 2.43 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash
#
# Copyright (c) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
# This script will execute the Kata Containers Test Suite.
set -e
cidir=$(dirname "$0")
source "${cidir}/lib.sh"
export RUNTIME="kata-runtime"
export CI_JOB="${CI_JOB:-default}"
case "${CI_JOB}" in
"CRI_CONTAINERD_K8S")
echo "INFO: Containerd checks"
sudo -E PATH="$PATH" bash -c "make cri-containerd"
sudo -E PATH="$PATH" CRI_RUNTIME="containerd" bash -c "make kubernetes"
# Make sure the feature works with K8s + containerd
"${cidir}/toggle_sandbox_cgroup_only.sh" true
sudo -E PATH="$PATH" bash -c "make cri-containerd"
"${cidir}/toggle_sandbox_cgroup_only.sh" true
sudo -E PATH="$PATH" CRI_RUNTIME="containerd" bash -c "make kubernetes"
# remove config created by toggle_sandbox_cgroup_only.sh
"${cidir}/toggle_sandbox_cgroup_only.sh" false
sudo rm -f "/etc/kata-containers/configuration.toml"
echo "INFO: Running docker integration tests with sandbox cgroup enabled"
sudo -E PATH="$PATH" bash -c "make sandbox-cgroup"
;;
"FIRECRACKER")
echo "INFO: Running docker integration tests"
sudo -E PATH="$PATH" bash -c "make docker"
echo "INFO: Running soak test"
sudo -E PATH="$PATH" bash -c "make docker-stability"
echo "INFO: Running oci call test"
sudo -E PATH="$PATH" bash -c "make oci"
echo "INFO: Running networking tests"
sudo -E PATH="$PATH" bash -c "make network"
echo "INFO: Running crio tests"
sudo -E PATH="$PATH" bash -c "make crio"
;;
"CLOUD-HYPERVISOR")
echo "INFO: Containerd checks"
sudo -E PATH="$PATH" bash -c "make cri-containerd"
echo "INFO: Running kubernetes tests"
sudo -E PATH="$PATH" bash -c "make kubernetes"
echo "INFO: Running soak test"
sudo -E PATH="$PATH" bash -c "make docker-stability"
echo "INFO: Running oci call test"
sudo -E PATH="$PATH" bash -c "make oci"
echo "INFO: Running networking tests"
sudo -E PATH="$PATH" bash -c "make network"
;;
"CLOUD-HYPERVISOR-DOCKER")
echo "INFO: Running docker integration tests"
sudo -E PATH="$PATH" bash -c "make docker"
;;
"PODMAN")
export TRUSTED_GROUP="kvm"
newgrp "${TRUSTED_GROUP}" << END
echo "This is running as group $(id -gn)"
END
echo "INFO: Running podman integration tests"
bash -c "make podman"
;;
*)
echo "INFO: Running checks"
sudo -E PATH="$PATH" bash -c "make check"
echo "INFO: Running functional and integration tests ($PWD)"
sudo -E PATH="$PATH" bash -c "make test"
;;
esac