test
This commit is contained in:
parent
8485731d80
commit
80c7200643
3 changed files with 61 additions and 2 deletions
|
|
@ -1,4 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
# include err() and new() functions
|
||||||
|
. ./lib.sh
|
||||||
|
|
||||||
for test in test*.sh; do
|
for test in test*.sh; do
|
||||||
echo "Running $test"
|
echo "Running $test"
|
||||||
./$test
|
./$test
|
||||||
|
|
@ -8,4 +12,4 @@ for test in test*.sh; do
|
||||||
exit $errcode
|
exit $errcode
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
echo OK
|
||||||
|
|
|
||||||
55
test/clixon
Executable file
55
test/clixon
Executable 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
|
||||||
|
|
@ -21,7 +21,7 @@ clifn "clixon_cli -1f $clixon_cf set interfaces interface eth0" ""
|
||||||
|
|
||||||
new "cli show configuration"
|
new "cli show configuration"
|
||||||
clifn "clixon_cli -1f $clixon_cf show conf cli" "interfaces interface name eth0
|
clifn "clixon_cli -1f $clixon_cf show conf cli" "interfaces interface name eth0
|
||||||
interfaces interface enabled htrue"
|
interfaces interface enabled true"
|
||||||
|
|
||||||
new "Kill backend"
|
new "Kill backend"
|
||||||
# kill backend
|
# kill backend
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue