buildbot_config/worker/vbox_clean
Colin Finck 1a63dd8908
Launching xvfb-run inside a detached screen seems to work even better than running it in the background of the current shell.
This fixes vbox_clean hanging at "Starting VirtualBox GUI" after the upgrade to BuildBot 2.3.1.
It may also help to fix the infamous "IVirtualBox object is null" bug.
2019-06-29 14:03:43 +02:00

24 lines
818 B
Bash
Executable File

#!/bin/bash
# ReactOS BuildBot Build Scripts
# vbox_clean - Clean the remainders of a previous VirtualBox session before running regression tests
source ../../config.inc
echo "* Stopping all running VMs"
VBoxManage list runningvms | awk '{print $2;}' | xargs -I vmid VBoxManage controlvm vmid poweroff
# Kill all Xvfb processes for this user.
# This will automatically terminate the associated VirtualBox processes too.
echo "* Killing VirtualBox processes"
killall Xvfb
sleep 5s
echo "* Killing VirtualBox processes harder"
ps axu | grep -i '/usr/lib/virtualbox' | grep -v grep | awk '{print $2}' | xargs kill -9
sleep 15s
echo "* Starting VirtualBox GUI"
screen -d -m xvfb-run --listen-tcp --server-num 44 --server-args="-screen 0 1024x768x24" --auth-file /tmp/xvfb.auth -a /usr/bin/VirtualBox
sleep 15s
exit 0