+
#!/bin/bash
if [ `dirname $0` != "." ]; then
# make sure that no VirtualBox processes are left running
cleanup_all() {
+ set +e
echo "$(date -u) - cleanup in progress..."
- ps auxww|grep VBox
+ ps auxww | grep -e VBox -e qemu
cd $WORKSPACE/buildserver
- vagrant halt || true
+ vagrant halt
sleep 5
- killall VBoxHeadless || true
+ killall VBoxHeadless
sleep 5
- killall -9 VBoxHeadless || true
+ killall -9 VBoxHeadless
echo "$(date -u) - cleanup done."
}
trap cleanup_all INT TERM EXIT
export XDG_CONFIG_HOME=$WORKSPACE
export VBOX_USER_HOME=$WORKSPACE/VirtualBox
mkdir $VBOX_USER_HOME
-VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
-VBoxManage setproperty logginglevel debug
+if which VBoxManage; then
+ VBoxManage setproperty machinefolder $WORKSPACE/virtualbox.d
+ VBoxManage setproperty logginglevel debug
+fi
export VAGRANT_HOME=$WORKSPACE/vagrant.d
mkdir $VAGRANT_HOME
echo "debian_mirror = 'http://ftp.uk.debian.org/debian/'" > $WORKSPACE/makebuildserver.config.py
echo "boot_timeout = 1200" >> $WORKSPACE/makebuildserver.config.py
echo "apt_package_cache = True" >> $WORKSPACE/makebuildserver.config.py
-./makebuildserver --verbose
+./makebuildserver --verbose --clean
# this can be handled in the jenkins job, or here:
if [ -e fdroiddata ]; then