Merge branch 'master' of https://github.com/clicon/clixon
This commit is contained in:
commit
3dd67474e0
23 changed files with 119 additions and 50 deletions
|
|
@ -23,7 +23,7 @@
|
|||
>&2 echo "Running $testfile"
|
||||
|
||||
# Site file, an example of this file in README.md
|
||||
if [ -x ./site.sh ]; then
|
||||
if [ -f ./site.sh ]; then
|
||||
|
||||
. ./site.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ new "Make DESTDIR install"
|
|||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
|
||||
new "Check installed files /usr"
|
||||
if [ ! -d $dir/usr ]; then
|
||||
err $dir/usr
|
||||
|
|
@ -59,3 +58,5 @@ l=$(find $dir -type l)
|
|||
if [ -n "$l" ]; then
|
||||
err "$l"
|
||||
fi
|
||||
|
||||
rm -rf $dir
|
||||
|
|
|
|||
|
|
@ -261,12 +261,11 @@ runtest(){
|
|||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
new "start backend -s $mode -f $cfg"
|
||||
# start new backend
|
||||
sudo $clixon_backend -s $mode -f $cfg -D $DBG
|
||||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
new "start backend -s $mode -f $cfg"
|
||||
start_backend -s $mode -f $cfg
|
||||
|
||||
new "waiting"
|
||||
sleep $RCWAIT
|
||||
else
|
||||
new "Restart backend as eg follows: -Ff $cfg -s $mode ($BETIMEOUT s)"
|
||||
sleep $BETIMEOUT
|
||||
|
|
@ -311,23 +310,28 @@ runtest startup '<data><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:e
|
|||
new "4. Load non-compat invalid startup. Enter failsafe, startup invalid."
|
||||
(cd $dir; rm -f tmp_db candidate_db running_db startup_db) # remove databases
|
||||
(cd $dir; cp non-compat-invalid.xml startup_db)
|
||||
runtest startup '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><a0 xmlns="urn:example:a">old version</a0><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
runtest startup '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a0 xmlns="urn:example:a">old version</a0><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
|
||||
new "5. Load non-compat invalid running. Enter failsafe, startup invalid."
|
||||
(cd $dir; rm -f tmp_db candidate_db running_db startup_db) # remove databases
|
||||
(cd $dir; cp non-compat-invalid.xml running_db)
|
||||
runtest running '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><a0 xmlns="urn:example:a">old version</a0><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
runtest running '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a0 xmlns="urn:example:a">old version</a0><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
|
||||
new "6. Load compatible invalid startup."
|
||||
(cd $dir; rm -f tmp_db candidate_db running_db startup_db) # remove databases
|
||||
(cd $dir; cp compat-invalid.xml startup_db)
|
||||
runtest startup '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><a0 xmlns="urn:example:a">old version</a0><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
runtest startup '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<data><a0 xmlns="urn:example:a">old version</a0><a1 xmlns="urn:example:a">always work</a1><b xmlns="urn:example:b">other text</b><c xmlns="urn:example:c">bla bla</c></data>'
|
||||
|
||||
# This testcase contains an error/exception of the clixon xml parser, and
|
||||
# I cant track down the memory leakage.
|
||||
if [ $valgrindtest -ne 2 ]; then
|
||||
new "7. Load non-compat startup. Syntax fail, enter failsafe, startup invalid"
|
||||
(cd $dir; rm -f tmp_db candidate_db running_db startup_db) # remove databases
|
||||
(cd $dir; cp compat-err.xml startup_db)
|
||||
runtest startup '<data><a1 xmlns="urn:example:a">always work</a1></data>' '<rpc-error><error-type>application</error-type><error-tag>operation-failed</error-tag><error-severity>error</error-severity><error-message>read registry</error-message></rpc-error>'
|
||||
|
||||
fi
|
||||
|
||||
if [ $BE -ne 0 ]; then
|
||||
rm -rf $dir
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue