auto scripts

This commit is contained in:
Olof Hagsand 2016-03-08 11:40:47 +01:00
parent 2b254e5e67
commit 4b19798b58
2 changed files with 29 additions and 25 deletions

View file

@ -1,8 +1,9 @@
Some test cases:
With and without xmldb_rpc:
set a list entry
set a nested entry
Completion
validate with missing mandatory variable
commit
delete all
This directory contains testing code for clixon and the example
routing application:
clixon A top-level script clones clixon in /tmp and starts all.sh
You can _copy_ this file (review it) and place as cron script
all.sh Run through all tests named 'test*.sh' in this directory.
Therefore, if you place a test in this directory matching
'test*.sh' it will be run automatically.
test1.sh First test
test2.sh Second test,...

View file

@ -1,55 +1,58 @@
#!/bin/sh
# Top-level cron scripts. Add this to (for example) /etc/cron.daily
err(){
testname=$1
errcode=$2
echo "Error in [$testname]"
logger "CLIXON: Error in [$testname]"
exit $errcode
}
# cd to working dir
cd /tmp
if [ $# -ne 0 ]; then
echo "usage: $0"
exit 1
err "usage: $0" 0
fi
rm -rf clixon
git clone https://github.com/clicon/clixon.git
if [ $? -ne 0 ]; then
echo "Error in git clone"
exit 1
err "git clone" 1
fi
cd clixon
CFLAGS=-Werror ./configure
if [ $? -ne 0 ]; then
echo "Error in configure"
exit 1
err "configure" 2
fi
make
if [ $? -ne 0 ]; then
echo "Error in make"
exit 1
err "make" 3
fi
sudo make install
if [ $? -ne 0 ]; then
echo "Error in make install"
exit 1
err "make install" 4
fi
sudo make install-include
if [ $? -ne 0 ]; then
echo "Error in make install-include"
err "make install include" 5
exit 1
fi
cd example
make
if [ $? -ne 0 ]; then
echo "Error in make"
exit 1
err "make example" 6
fi
sudo make install
if [ $? -ne 0 ]; then
echo "Error in make install"
exit 1
err "make install example" 7
fi
cd ../test
#./all.sh
(cd /home/olof/src/clixon/test; ./all.sh)
errcode=$?
if [ $errcode -ne 0 ]; then
echo "test error"
exit $errcode
err "test" $errcode
fi
cd ../..
rm -rf clixon
logger "CLIXON: tests OK"