diff options
author | Hans-Christoph Steiner <hans@eds.org> | 2017-11-08 09:30:21 +0100 |
---|---|---|
committer | Mattia Rizzolo <mattia@debian.org> | 2017-11-08 12:02:55 +0100 |
commit | cfaf042ae484268bc3cf1524df0a84720cd95e37 (patch) | |
tree | 0a62fb183050e441de519102a3ec5828493dfd26 /bin | |
parent | c9d07156e6d6d5e94632a4c03d25aaa4f23edefb (diff) | |
download | jenkins.debian.net-cfaf042ae484268bc3cf1524df0a84720cd95e37.tar.xz |
reproducible_fdroid: separate testsuite into its own job
Right now, minor failures in the test suite mark the long lived jobs as
failed. The test suite always takes shorter than an hour to run, so it can
be more easily repeated. The tests are moved from the other two jobs into
this one.
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/jenkins_node_wrapper.sh | 2 | ||||
-rw-r--r-- | bin/reproducible_fdroid_test.sh | 51 |
2 files changed, 53 insertions, 0 deletions
diff --git a/bin/jenkins_node_wrapper.sh b/bin/jenkins_node_wrapper.sh index 7413b0ad..ee39552a 100755 --- a/bin/jenkins_node_wrapper.sh +++ b/bin/jenkins_node_wrapper.sh @@ -136,6 +136,8 @@ elif [[ "$*" =~ ^reproducible_setup_schroot_archlinux ]] ; then exec /srv/jenkins/bin/reproducible_setup_archlinux_schroot.sh ; croak "Exec failed"; elif [[ "$*" =~ ^reproducible_fdroid_build_apps ]] ; then exec /srv/jenkins/bin/reproducible_fdroid_build_apps.sh ; croak "Exec failed"; +elif [[ "$*" =~ ^reproducible_fdroid_test ]] ; then + exec /srv/jenkins/bin/reproducible_fdroid_test.sh ; croak "Exec failed"; elif [[ "$*" =~ ^reproducible_setup_fdroid_build_environment ]] ; then exec /srv/jenkins/bin/reproducible_setup_fdroid_build_environment.sh ; croak "Exec failed"; elif [[ "$*" =~ ^reproducible_setup_mock_fedora-23_x86_64 ]] ; then diff --git a/bin/reproducible_fdroid_test.sh b/bin/reproducible_fdroid_test.sh new file mode 100644 index 00000000..a7bd8662 --- /dev/null +++ b/bin/reproducible_fdroid_test.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Copyright © 2015-2017 Holger Levsen (holger@layer-acht.org) +# Copyright © 2017 Hans-Christoph Steiner (hans@guardianproject.info) +# released under the GPLv=2 + +# +# + +DEBUG=true +. /srv/jenkins/bin/common-functions.sh +common_init "$@" + +# common code +. /srv/jenkins/bin/reproducible_common.sh + +GIT_REPO=https://gitlab.com/fdroid/fdroidserver + +# define and clean work space on the machine actually running the +# build. jenkins.debian.net does not use Jenkins slaves. Instead +# /srv/jenkins/bin/jenkins_master_wrapper.sh runs this script on the +# slave using a directly call to ssh, so this script has to do all +# of the workspace setup. +export WORKSPACE=$BASE/reproducible_fdroid_build_apps +if [ -e $WORKSPACE/.git ]; then + # reuse the git repo if possible, to keep all the setup in fdroiddata/ + cd $WORKSPACE + git remote set-url origin $GIT_REPO + git fetch --tags + git clean -fdx + git reset --hard + git checkout master + git reset --hard origin/master + git clean -fdx +else + rm -rf $WORKSPACE + git clone $GIT_REPO $WORKSPACE + cd $WORKSPACE +fi + +cleanup_all() { + # no long lived processes, nothing to be done + echo "$(date -u) - cleanup done." +} +trap cleanup_all INT TERM EXIT + +./jenkins-test + +# remove trap +trap - INT TERM EXIT +echo "$(date -u) - the end." |