blob: af85d5ca915c1397346acc4e449eb5f7725585de (
plain)
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
|
image: debian:sid-slim
shellcheck:
stage: test
script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install shellcheck
- shellcheck debvm-*
codespell:
stage: test
script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install codespell
- codespell debvm-*
.test_script:
script:
- timeout 120s ./debvm-run -s 2222 &
- |
timeout=5
sshopt="-o StrictHostKeyChecking=no $(if test "$RELEASE" = jessie; then echo -o PubkeyAcceptedKeyTypes=+ssh-rsa; fi)"
ts=$(sleepenh 0 || [ $? -eq 1 ])
for i in $(seq 30); do
rv=0
ssh $sshopt -o ConnectTimeout="$timeout" -i ~/.ssh/id -p 2222 root@localhost echo success || rv=$?
test $rv -eq 0 && break
ts=$(sleepenh "$ts" "$timeout" || [ $? -eq 1 ]);
if test $i -eq 30; then
echo "timeout reached" >&2
exit 1
fi
done
- ssh $sshopt -i ~/.ssh/id -p 2222 root@localhost poweroff
release_test:
extends: .test_script
stage: test
parallel:
matrix:
- RELEASE:
- sid
- bookworm
- bullseye
- buster
- stretch
- jessie
before_script:
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client sleepenh qemu-kvm
- ssh-keygen -f ~/.ssh/id -N ''
- ./debvm-create -k ~/.ssh/id.pub
arch_test:
extends: .test_script
stage: test
parallel:
matrix:
- ARCHITECTURE:
- arm64
- armhf
- i386
- ppc64el
- s390x
before_script:
- |
if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
fi
- apt-get update
- apt-get dist-upgrade --yes
- apt-get --no-install-recommends --yes install e2fsprogs genext2fs mmdebstrap openssh-client sleepenh qemu-system binfmt-support arch-test qemu-user-static
- ssh-keygen -f ~/.ssh/id -N ''
- ./debvm-create -k ~/.ssh/id.pub -a $ARCHITECTURE
|