#!/bin/sh
# This script is invoked by tarmac - the automatic branch lader - before it
# allows a merge request to land into trunk
set -e

# Destroy VMs after we're done with each image. This works around
# a bug in virtualbox shared folder filesystem.
export VAGRANT_DONE_ACTION=destroy

# Run checkbox tests, plainbox tests, integration tests and plainbox docs
time -o timing.dat ./test-in-vagrant.sh
echo "Complete checkbox, plainbox, integration and docs time:"
cat timing.dat

# Ping rtfd.org to refresh the documentation
curl -X POST http://readthedocs.org/build/plainbox
curl -X POST http://readthedocs.org/build/checkbox
