|
206 | 206 | SHELL |
207 | 207 | end |
208 | 208 |
|
| 209 | + config.vm.provision "install-failpoint-binaries", type: "shell", run: "once" do |sh| |
| 210 | + sh.upload_path = "/tmp/vagrant-install-failpoint-binaries" |
| 211 | + sh.inline = <<~SHELL |
| 212 | + #!/usr/bin/env bash |
| 213 | + source /etc/environment |
| 214 | + source /etc/profile.d/sh.local |
| 215 | + set -eux -o pipefail |
| 216 | + ${GOPATH}/src/github.com/containerd/containerd/script/setup/install-failpoint-binaries |
| 217 | + chcon -v -t container_runtime_exec_t $(type -ap containerd-shim-runc-fp-v1) |
| 218 | + containerd-shim-runc-fp-v1 -v |
| 219 | + SHELL |
| 220 | + end |
| 221 | + |
209 | 222 | # SELinux is Enforcing by default. |
210 | 223 | # To set SELinux as Disabled on a VM that has already been provisioned: |
211 | 224 | # SELINUX=Disabled vagrant up --provision-with=selinux |
|
245 | 258 | SHELL |
246 | 259 | end |
247 | 260 |
|
| 261 | + # SELinux is Enforcing by default (via provisioning) in this VM. To re-run with SELinux disabled: |
| 262 | + # SELINUX=Disabled vagrant up --provision-with=selinux,test-cri-integration |
| 263 | + # |
| 264 | + config.vm.provision "test-cri-integration", type: "shell", run: "never" do |sh| |
| 265 | + sh.upload_path = "/tmp/test-cri-integration" |
| 266 | + sh.env = { |
| 267 | + 'GOTEST': ENV['GOTEST'] || "go test", |
| 268 | + 'GOTESTSUM_JUNITFILE': ENV['GOTESTSUM_JUNITFILE'], |
| 269 | + 'GOTESTSUM_JSONFILE': ENV['GOTESTSUM_JSONFILE'], |
| 270 | + 'GITHUB_WORKSPACE': '', |
| 271 | + 'ENABLE_CRI_SANDBOXES': ENV['ENABLE_CRI_SANDBOXES'], |
| 272 | + } |
| 273 | + sh.inline = <<~SHELL |
| 274 | + #!/usr/bin/env bash |
| 275 | + source /etc/environment |
| 276 | + source /etc/profile.d/sh.local |
| 277 | + set -eux -o pipefail |
| 278 | + cleanup() { |
| 279 | + rm -rf /var/lib/containerd* /run/containerd* /tmp/containerd* /tmp/test* /tmp/failpoint* /tmp/nri* |
| 280 | + } |
| 281 | + cleanup |
| 282 | + cd ${GOPATH}/src/github.com/containerd/containerd |
| 283 | + # cri-integration.sh executes containerd from ./bin, not from $PATH . |
| 284 | + make BUILDTAGS="seccomp selinux no_aufs no_btrfs no_devmapper no_zfs" binaries bin/cri-integration.test |
| 285 | + chcon -v -t container_runtime_exec_t ./bin/{containerd,containerd-shim*} |
| 286 | + CONTAINERD_RUNTIME=io.containerd.runc.v2 ./script/test/cri-integration.sh |
| 287 | + cleanup |
| 288 | + SHELL |
| 289 | + end |
| 290 | + |
248 | 291 | # SELinux is Enforcing by default (via provisioning) in this VM. To re-run with SELinux disabled: |
249 | 292 | # SELINUX=Disabled vagrant up --provision-with=selinux,test-cri |
250 | 293 | # |
|
0 commit comments