]>
Commit | Line | Data |
---|---|---|
0a8722fd | 1 | #!/bin/sh |
72d0e1cb SG |
2 | |
3 | cleanup() { | |
4 | rm -f /etc/lxc/test-busybox.conf | |
5 | rm -f liblxc.so.0 | |
6 | } | |
7 | ||
8 | if [ `id -u` -ne 0 ]; then | |
14d9c0f0 SG |
9 | echo "Run as root" |
10 | exit 1 | |
72d0e1cb SG |
11 | fi |
12 | ||
13 | cat > /etc/lxc/test-busybox.conf << EOF | |
14 | lxc.network.type=veth | |
15 | lxc.network.link=lxcbr0 | |
16 | lxc.network.flags=up | |
17 | EOF | |
18 | ||
19 | [ -f liblxc.so.0 ] || ln -s src/lxc/liblxc.so ./liblxc.so.0 | |
20 | export LD_LIBRARY_PATH=. | |
16216c83 | 21 | TESTS="lxc-test-containertests lxc-test-locktests lxc-test-startone" |
72d0e1cb | 22 | for 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 |
30 | done |
31 | echo "All tests passed" | |
32 | cleanup |