mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-06-02 12:41:35 +00:00

This commit updates all scripts using mixed indent to a consistent 4 spaces indent. In the past quite a few of those scripts used tabs to instead of 8 spaces or instead of 4 spaces, sometimes mixing those in the same line and sometimes changing the tab width within the same file. Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
33 lines
643 B
Bash
33 lines
643 B
Bash
#!/bin/sh
|
|
|
|
cleanup() {
|
|
rm -f /etc/lxc/test-busybox.conf
|
|
rm -f liblxc.so.0
|
|
}
|
|
|
|
if [ `id -u` -ne 0 ]; then
|
|
echo "Run as root"
|
|
exit 1
|
|
fi
|
|
|
|
cat > /etc/lxc/test-busybox.conf << EOF
|
|
lxc.network.type=veth
|
|
lxc.network.link=lxcbr0
|
|
lxc.network.flags=up
|
|
EOF
|
|
|
|
[ -f liblxc.so.0 ] || ln -s src/lxc/liblxc.so ./liblxc.so.0
|
|
export LD_LIBRARY_PATH=.
|
|
TESTS="lxc-test-containertests lxc-test-locktests lxc-test-startone"
|
|
for curtest in $TESTS; do
|
|
echo "running $curtest"
|
|
./src/tests/$curtest
|
|
if [ $? -ne 0 ]; then
|
|
echo "Test $curtest failed. Stopping"
|
|
cleanup
|
|
exit 1
|
|
fi
|
|
done
|
|
echo "All tests passed"
|
|
cleanup
|