chiark / gitweb /
jenkins: move tests to separate job
[fdroidserver.git] / jenkins-test
1 #!/bin/bash
2 #
3 # this is the script run by the Jenkins server to run the tools tests.  Be
4 # sure to always run it in its dir, i.e. ./jenkins-test, otherwise it might
5 # remove things that you don't want it to.
6
7 if [ `dirname $0` != "." ]; then
8     echo "only run this script like ./`basename $0`"
9     exit
10 fi
11
12 # jenkins.debian.net slaves do not export WORKSPACE
13 if [ -z $WORKSPACE ]; then
14     export WORKSPACE=`pwd`
15 fi
16
17 set -e
18 set -x
19
20 cd tests
21 ./run-tests $WORKSPACE/fdroiddata/unsigned
22
23 # set up Android SDK to use the Debian packages in stretch
24 export ANDROID_HOME=/usr/lib/android-sdk
25
26 # the way we handle jenkins slaves doesn't copy the workspace to the slaves
27 # so we need to "manually" clone the git repo hereā€¦
28 cd $WORKSPACE/fdroiddata
29
30 test -e config.py || ../fdroid init --verbose
31
32 export GNUPGHOME=$WORKSPACE/tests/gnupghome
33 echo "build_server_always = True" > config.py
34 echo "gpghome = '$GNUPGHOME'" >> config.py
35 echo "gpgkey = 'CE71F7FB'" >> config.py
36
37 # publish process when building and signing are on separate machines
38 test -d repo || mkdir repo
39 test -d archive || mkdir archive
40 # when everything is copied over to run on SIGN machine
41 ../fdroid publish --verbose
42 ../fdroid gpgsign --verbose
43 # when everything is copied over to run on BUILD machine
44 ../fdroid update --verbose --nosign
45 # when everything is copied over to run on SIGN machine
46 ../fdroid signindex --verbose
47
48 ../fdroid rewritemeta --verbose
49 git --no-pager diff