#!/bin/sh
# Kicks off the Jenkins tests.

VBGUEST=$(vagrant plugin list |grep -i vbguest)
if [ ! "$VBGUEST" ]; then
  vagrant plugin install vagrant-vbguest
fi;

/opt/vagrant/bin/vagrant up
/opt/vagrant/bin/vagrant ssh -c 'cd /home/vagrant/dxr && source /home/vagrant/venv/bin/activate && make clean && make test'
RESULT=$?
/opt/vagrant/bin/vagrant destroy --force || exit $?
exit $RESULT

#!/bin/sh
# Kicks off the Jenkins tests.

VBGUEST=$(vagrant plugin list |grep -i vbguest)
if [ ! "$VBGUEST" ]; then
  vagrant plugin install vagrant-vbguest
fi;

/opt/vagrant/bin/vagrant up
sleep 2  # Dodge "SSH connection was refused" errors.
/opt/vagrant/bin/vagrant ssh -c 'cd /home/vagrant/dxr && source /home/vagrant/venv/bin/activate && make clean && make test'
RESULT=$?
/opt/vagrant/bin/vagrant destroy --force || exit $?
exit $RESULT

Add a sleep after "vagrant up" to dodge ssh intermittent failures.
Add a sleep after "vagrant up" to dodge ssh intermittent failures.

Example: https://ci.mozilla.org/job/dxr-github/856/console