summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorJochen Sprickerhof <git@jochen.sprickerhof.de>2022-12-23 20:55:37 +0100
committerJochen Sprickerhof <git@jochen.sprickerhof.de>2022-12-23 23:06:21 +0100
commitaf4f1eb0cd386e7d6aa06a097998f4bbcbf9bb43 (patch)
tree7150222e616d945b5f27a1af635eb2fbab3b29fa /.gitlab-ci.yml
parent8899775ccfce4b0b9373b3e3bd00220cca349f93 (diff)
downloaddebvm-af4f1eb0cd386e7d6aa06a097998f4bbcbf9bb43.tar.gz
Move tests to tests/create-and-run.sh (Closes: #4)
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml31
1 files changed, 4 insertions, 27 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 8af5b41..5d5f375 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,27 +14,7 @@ codespell:
- apt-get --no-install-recommends --yes install codespell
- codespell debvm-*
-.test_script:
- script:
- - timeout 240s ./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
parallel:
matrix:
- RELEASE:
@@ -44,15 +24,13 @@ release_test:
- buster
- stretch
- jessie
- before_script:
+ 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 -r "$RELEASE"
+ - PATH=.:$PATH ./tests/create-and-run.sh -r "$RELEASE"
arch_test:
- extends: .test_script
parallel:
matrix:
- ARCHITECTURE:
@@ -63,7 +41,7 @@ arch_test:
- mipsel
- ppc64el
- s390x
- before_script:
+ script:
- |
if [ ! -e /proc/sys/fs/binfmt_misc/status ]; then
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
@@ -71,5 +49,4 @@ arch_test:
- 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"
+ - PATH=.:$PATH ./tests/create-and-run.sh -a "$ARCHITECTURE"