forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
198 lines (158 loc) · 5 KB
/
Makefile
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#
# Copyright (c) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
ifneq (,$(wildcard /usr/lib/os-release))
include /usr/lib/os-release
else
include /etc/os-release
endif
# The time limit in seconds for each test
TIMEOUT := 120
PODMAN_DEPENDENCY = podman
ifeq (${CI}, true)
ifneq (${TEST_CGROUPSV2}, true)
PODMAN_DEPENDENCY =
endif
endif
# union for 'make test'
UNION := kubernetes
# filter scheme script for docker integration test suites
FILTER_FILE = .ci/filter/filter_docker_test.sh
# skipped docker integration tests for Firecraker
# Firecracker configuration file
FIRECRACKER_CONFIG = .ci/hypervisors/firecracker/configuration_firecracker.yaml
# Cloud hypervisor configuration file
CLH_CONFIG = .ci/hypervisors/clh/configuration_clh.yaml
ifneq ($(wildcard $(FILTER_FILE)),)
SKIP_FIRECRACKER := $(shell bash -c '$(FILTER_FILE) $(FIRECRACKER_CONFIG)')
SKIP_CLH := $(shell bash -c '$(FILTER_FILE) $(CLH_CONFIG)')
endif
# get arch
ARCH := $(shell bash -c '.ci/kata-arch.sh -d')
ARCH_DIR = arch
ARCH_FILE_SUFFIX = -options.mk
ARCH_FILE = $(ARCH_DIR)/$(ARCH)$(ARCH_FILE_SUFFIX)
INSTALL_FILES := $(wildcard .ci/install_*.sh)
INSTALL_TARGETS := $(INSTALL_FILES:.ci/install_%.sh=install-%)
# Load architecture-dependent settings
ifneq ($(wildcard $(ARCH_FILE)),)
include $(ARCH_FILE)
endif
default: checkcommits github-labels
checkcommits:
make -C cmd/checkcommits
github-labels:
make -C cmd/github-labels
spell-check-dictionary:
make -C cmd/check-spelling
check-markdown:
make -C cmd/check-markdown
ginkgo:
ln -sf . vendor/src
GOPATH=$(PWD)/vendor go build ./vendor/github.com/onsi/ginkgo/ginkgo
unlink vendor/src
docker: ginkgo
ifeq ($(RUNTIME),)
$(error RUNTIME is not set)
endif
ifeq ($(KATA_HYPERVISOR),firecracker)
./ginkgo -failFast -v -focus "${FOCUS}" -skip "${SKIP_FIRECRACKER}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT} \
-hypervisor=$(KATA_HYPERVISOR)
else ifeq ($(KATA_HYPERVISOR),cloud-hypervisor)
./ginkgo -failFast -v -focus "${FOCUS}" -skip "${SKIP_CLH}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT} \
-hypervisor=$(KATA_HYPERVISOR)
else ifeq ($(ARCH),$(filter $(ARCH), aarch64 s390x ppc64le))
./ginkgo -failFast -v -focus "${FOCUS}" -skip "${SKIP}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
else ifneq (${FOCUS},)
./ginkgo -failFast -v -focus "${FOCUS}" -skip "${SKIP}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
else
# Run tests in parallel, skip tests that need to be run serialized
./ginkgo -failFast -p -stream -v -skip "${SKIP}" -skip "\[Serial Test\]" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
# Now run serialized tests
./ginkgo -failFast -v -focus "\[Serial Test\]" -skip "${SKIP}" \
./integration/docker/ -- -runtime=${RUNTIME} -timeout=${TIMEOUT}
bash sanity/check_sanity.sh
endif
crio:
bash .ci/install_bats.sh
./integration/cri-o/cri-o.sh
docker-stability:
systemctl is-active --quiet docker || sudo systemctl start docker
cd integration/stability && \
export ITERATIONS=2 && export MAX_CONTAINERS=20 && ./soak_parallel_rm.sh
cd integration/stability && ./hypervisor_stability_kill_test.sh
ksm:
bash -f integration/ksm/ksm_test.sh
kubernetes:
bash -f .ci/install_bats.sh
bash -f integration/kubernetes/run_kubernetes_tests.sh
kubernetes-e2e:
cd "integration/kubernetes/e2e_conformance" &&\
cat skipped_tests_e2e.yaml &&\
bash ./setup.sh &&\
bash ./run.sh
sandbox-cgroup:
bash -f integration/sandbox_cgroup/sandbox_cgroup_test.sh
stability:
cd integration/stability && \
ITERATIONS=2 MAX_CONTAINERS=20 ./soak_parallel_rm.sh
cd integration/stability && ./hypervisor_stability_kill_test.sh
shimv2:
bash integration/containerd/shimv2/shimv2-tests.sh
bash integration/containerd/shimv2/shimv2-factory-tests.sh
cri-containerd:
bash integration/containerd/cri/integration-tests.sh
log-parser:
make -C cmd/log-parser
pentest:
bash -f pentest/all.sh
tracing:
bash tracing/tracing-test.sh
vcpus:
bash -f integration/vcpus/default_vcpus_test.sh
pmem:
bash -f integration/pmem/pmem_test.sh
filesystem:
bash -f ./conformance/posixfs/fstests.sh
test: ${UNION}
check: checkcommits log-parser
$(INSTALL_TARGETS): install-%: .ci/install_%.sh
@bash -f $<
list-install-targets:
@echo $(INSTALL_TARGETS) | tr " " "\n"
vfio:
# Skip: Issue: https://github.com/kata-containers/kata-containers/issues/1488
# bash -f functional/vfio/run.sh -s false -p clh -i image
# bash -f functional/vfio/run.sh -s true -p clh -i image
bash -f functional/vfio/run.sh -s false -p qemu -m q35 -i image
bash -f functional/vfio/run.sh -s true -p qemu -m q35 -i image
help:
@echo Subsets of the tests can be run using the following specific make targets:
@echo " $(UNION)" | sed 's/ /\n\t/g'
# PHONY in alphabetical order
.PHONY: \
check \
checkcommits \
crio \
docker \
docker-stability \
filesystem \
ginkgo \
$(INSTALL_TARGETS) \
kubernetes \
list-install-targets \
log-parser \
pentest \
sandbox-cgroup \
test \
tracing \
vcpus \
vfio \
pmem