~kissiel/checkbox/validation-rework

1728 by Zygmunt Krynicki
Add tarmac-verify
1
#!/bin/sh
2
# This script is invoked by tarmac - the automatic branch lader - before it
3
# allows a merge request to land into trunk
2005.1.1 by Zygmunt Krynicki
tarmac-verify: use set -e to actually stop if tests fail
4
set -e
1975.5.9 by Zygmunt Krynicki
tarmac-verify: revive tarmac pre-commit check script
5
6
# Destroy VMs after we're done with each image. This works around
7
# a bug in virtualbox shared folder filesystem.
8
export VAGRANT_DONE_ACTION=destroy
3015.1.3 by Daniel Manrique
Update tarmac-verify to use lxc containers.
9
# Which test runner/container to use. We default to LXC but
10
# honor an external env variable to set this.
11
TEST_RUNNER=${TEST_RUNNER:-lxc}
12
# Use tmpfs for the lxc containers, faster but requires more RAM (about 2 GB)
3026.1.1 by Daniel Manrique
tarmac-verify: fix setting of KEEP_DATA environment variable
13
# NOTE: Needs to be a non-empty blank string due to weird ${param:-default}
14
# semantics
15
export KEEP_DATA=" "
1975.5.9 by Zygmunt Krynicki
tarmac-verify: revive tarmac pre-commit check script
16
# Run checkbox tests, plainbox tests, integration tests and plainbox docs
3015.1.3 by Daniel Manrique
Update tarmac-verify to use lxc containers.
17
if [ "$TEST_RUNNER" = "vagrant" ]; then
4486.1.1 by Sylvain Pineau
support: Move test-in-[lxc|vagrant] to the support directory
18
    time -o timing.dat ./support/test-in-vagrant.sh
3015.1.3 by Daniel Manrique
Update tarmac-verify to use lxc containers.
19
else
4486.1.1 by Sylvain Pineau
support: Move test-in-[lxc|vagrant] to the support directory
20
    time -o timing.dat ./support/test-in-lxc.sh
3015.1.3 by Daniel Manrique
Update tarmac-verify to use lxc containers.
21
fi
22
# Vagrant testing can be done with this line
2060.2.1 by Daniel Manrique
Adds timing information to command runs, to better evaluate how long our tests and merges are taking so we can improve the process
23
echo "Complete checkbox, plainbox, integration and docs time:"
24
cat timing.dat
2496.1.6 by Zygmunt Krynicki
tarmac-verify: trigger rtfd.org rebuild after testing
25
26
# Ping rtfd.org to refresh the documentation
27
curl -X POST http://readthedocs.org/build/plainbox
28
curl -X POST http://readthedocs.org/build/checkbox