/
integration-test.yaml
96 lines (95 loc) · 2.79 KB
/
integration-test.yaml
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
- hosts: all
become: yes
roles:
- role: config-golang
go_version: '1.16.13'
arch: arm64
tasks:
- name: Install pre-requisites
shell:
cmd: |
set -xe
set -o pipefail
apt-get update
apt-get install -y btrfs-tools libseccomp-dev git pkg-config lsof gperf apparmor
go version
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Install containerd and cri dependencies
shell:
cmd: |
set -xe
make install-deps
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Install criu
shell:
cmd: |
set -xe
apt-get install -y \
libprotobuf-dev \
libprotobuf-c-dev \
protobuf-c-compiler \
protobuf-compiler \
python-protobuf \
libnl-3-dev \
libnet-dev \
libcap-dev \
python-future
wget https://github.com/checkpoint-restore/criu/archive/v3.13.tar.gz -O criu.tar.gz
tar -zxf criu.tar.gz
cd criu-3.13
make install-criu
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Install containerd
shell:
cmd: |
set -xe
make binaries
make install | tee $LOGS_PATH/make_install.log
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Tests
shell:
cmd: |
make test | tee $LOGS_PATH/make_test.log
make root-test | tee $LOGS_PATH/make_root-test.log
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Integration 1
shell:
cmd: |
make integration EXTRA_TESTFLAGS=-no-criu TESTFLAGS_RACE=-race | tee $LOGS_PATH/make_integration-test.log
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: Integration 2
shell:
cmd: |
TESTFLAGS_PARALLEL=1 make integration EXTRA_TESTFLAGS=-no-criu | tee $LOGS_PATH/make_integration-test.log
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: CRI Integration Test
shell:
cmd: |
CONTAINERD_RUNTIME="io.containerd.runc.v2" make cri-integration | tee $LOGS_PATH/make_cri-integration-test.log
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'
- name: CRI Integration Test
shell:
cmd: |
if grep -q "FAIL:" $LOGS_PATH/*.log; then
echo "FAILURE"
exit 1
fi
chdir: '{{ zuul.project.src_dir }}'
executable: /bin/bash
environment: '{{ global_env }}'