orfox / jenkins-build @ ec4107fc
History | View | Annotate | Download (888 Bytes)
| 1 |
#!/bin/sh |
|---|---|
| 2 |
# |
| 3 |
# this is the script run by the Jenkins server to run the build and tests. Be |
| 4 |
# sure to always run it in its dir, i.e. ./run-tests.sh, 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 |
set -e |
| 13 |
set -x |
| 14 |
|
| 15 |
if [ -z $WORKSPACE ]; then |
| 16 |
WORKSPACE=`pwd` |
| 17 |
fi |
| 18 |
|
| 19 |
#deploy our custom mozconfig |
| 20 |
cd $WORKSPACE |
| 21 |
cp mozconfig_template external/tor-browser/.mozconfig |
| 22 |
|
| 23 |
#switch to gecko dev and build |
| 24 |
cd external/tor-browser |
| 25 |
./mach configure |
| 26 |
./mach build |
| 27 |
./mach package |
| 28 |
./mach build-backend -b AndroidEclipse |
| 29 |
|
| 30 |
#------------------------------------------------------------------------------# |
| 31 |
# run local tests |
| 32 |
cd $WORKSPACE/tests |
| 33 |
./run-tests.sh |
| 34 |
|
| 35 |
# only tell jenkins there was an error if we got ERROR or FATAL |
| 36 |
[ $(($? & 1)) = "1" ] && exit 1 |
| 37 |
[ $(($? & 2)) = "2" ] && exit 2 |
| 38 |
set -e |