X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=travis%2Fexecute.sh;h=7d20e40325a1279d9679fedc467ca4575a70da70;hb=HEAD;hp=52e3d26c545b4086ea5df9023728545f78994cd2;hpb=361865654f56f29af19d6d32d48278bbe838c2de;p=grml-debootstrap.git diff --git a/travis/execute.sh b/travis/execute.sh deleted file mode 100755 index 52e3d26..0000000 --- a/travis/execute.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -set -eu -o pipefail - -RELEASE="${RELEASE:-stretch}" -export RELEASE - -# run shellcheck tests -docker run koalaman/shellcheck:stable --version -docker run -v "$(pwd)":/code koalaman/shellcheck:stable -e SC2181 /code/chroot-script /code/grml-debootstrap - -# build Debian package -wget -O- https://travis.debian.net/script.sh | sh - - -if ! [ "${TRAVIS_DEBIAN_DISTRIBUTION:-}" = "unstable" ] ; then - echo "TRAVIS_DEBIAN_DISTRIBUTION is $TRAVIS_DEBIAN_DISTRIBUTION and not unstable, skipping VM build tests." - exit 0 -fi - -# copy only the binary from the TRAVIS_DEBIAN_INCREMENT_VERSION_NUMBER=true build -cp ../grml-debootstrap_*travis*deb . - -# we need to run in privileged mode to be able to use loop devices -docker run --privileged -v "$(pwd)":/code --rm -i -t debian:stretch /code/travis/build-vm.sh - -[ -x ./goss ] || curl -fsSL https://goss.rocks/install | GOSS_DST="$(pwd)" sh - -sudo apt-get update -sudo apt-get -y install qemu-system-x86 - -# sudo timeout --preserve-status --foreground 120 qemu-system-x86_64 -hda qemu.img -serial stdio -display none | tee -a qemu.log -sudo qemu-system-x86_64 -hda qemu.img -serial stdio -display none | tee -a qemu.log & - -timeout=120 -success=0 -while [ "$timeout" -gt 0 ]; do - ((timeout--)) - if ./goss --gossfile ./travis/goss.yaml validate --format nagios ; then - success=1 - sleep 1 - break - else - echo "Tests didn't pass YET, will retry again [$timeout retries left]" - sleep 1 - fi -done - -if [ "$success" = "1" ] ; then - echo "All tests passed! (◕‿◕)" -else - echo "Reached timeout after $timeout seconds with failing tests. ¯\(º o)/¯ ☂" >&2 - echo "Latest test run results:" - ./goss --gossfile ./travis/goss.yaml validate - exit 1 -fi