This commit is contained in:
Olof hagsand 2016-03-07 22:09:31 +01:00
parent 8485731d80
commit 80c7200643
3 changed files with 61 additions and 2 deletions

View file

@ -1,4 +1,8 @@
#!/bin/sh
# include err() and new() functions
. ./lib.sh
for test in test*.sh; do
echo "Running $test"
./$test
@ -8,4 +12,4 @@ for test in test*.sh; do
exit $errcode
fi
done
echo OK

55
test/clixon Executable file
View file

@ -0,0 +1,55 @@
#!/bin/sh
# cd to working dir
cd /tmp
if [ $# -ne 0 ]; then
echo "usage: $0"
exit 1
fi
rm -rf clixon
git clone https://github.com/clicon/clixon.git
if [ $? -ne 0 ]; then
echo "Error in git clone"
exit 1
fi
cd clixon
CFLAGS=-Werror ./configure
if [ $? -ne 0 ]; then
echo "Error in configure"
exit 1
fi
make
if [ $? -ne 0 ]; then
echo "Error in make"
exit 1
fi
sudo make install
if [ $? -ne 0 ]; then
echo "Error in make install"
exit 1
fi
sudo make install-include
if [ $? -ne 0 ]; then
echo "Error in make install-include"
exit 1
fi
cd example
make
if [ $? -ne 0 ]; then
echo "Error in make"
exit 1
fi
sudo make install
if [ $? -ne 0 ]; then
echo "Error in make install"
exit 1
fi
cd ../test
#./all.sh
(cd /home/olof/src/clixon/test; ./all.sh)
errcode=$?
if [ $errcode -ne 0 ]; then
echo "test error"
exit $errcode
fi
cd ../..
rm -rf clixon

View file

@ -21,7 +21,7 @@ clifn "clixon_cli -1f $clixon_cf set interfaces interface eth0" ""
new "cli show configuration"
clifn "clixon_cli -1f $clixon_cf show conf cli" "interfaces interface name eth0
interfaces interface enabled htrue"
interfaces interface enabled true"
new "Kill backend"
# kill backend