]> git.proxmox.com Git - mirror_lxc.git/blame - runapitests.sh
include python files in make dist and rpm
[mirror_lxc.git] / runapitests.sh
CommitLineData
0a8722fd 1#!/bin/sh
72d0e1cb
SG
2
3cleanup() {
4 rm -f /etc/lxc/test-busybox.conf
5 rm -f liblxc.so.0
6}
7
8if [ `id -u` -ne 0 ]; then
14d9c0f0
SG
9 echo "Run as root"
10 exit 1
72d0e1cb
SG
11fi
12
13cat > /etc/lxc/test-busybox.conf << EOF
14lxc.network.type=veth
15lxc.network.link=lxcbr0
16lxc.network.flags=up
17EOF
18
19[ -f liblxc.so.0 ] || ln -s src/lxc/liblxc.so ./liblxc.so.0
20export LD_LIBRARY_PATH=.
16216c83 21TESTS="lxc-test-containertests lxc-test-locktests lxc-test-startone"
72d0e1cb 22for curtest in $TESTS; do
14d9c0f0
SG
23 echo "running $curtest"
24 ./src/tests/$curtest
25 if [ $? -ne 0 ]; then
26 echo "Test $curtest failed. Stopping"
27 cleanup
28 exit 1
29 fi
72d0e1cb
SG
30done
31echo "All tests passed"
32cleanup