Restructured error,debug anf log API

Renamed functions clicon->clixon, replaced global variables w access functions
Unified clicon_netconf_error with clixon_err()
This commit is contained in:
Olof hagsand 2023-11-13 10:12:52 +01:00
parent 261469be16
commit 24a4991ec8
199 changed files with 4668 additions and 4158 deletions

View file

@ -452,6 +452,7 @@ fi
function err(){
expect=$1
ret=$2
stty $STTYSETTINGS >/dev/null
echo -e "\e[31m\nError in Test$testnr [$testname]:"
if [ $# -gt 0 ]; then
echo "Expected"
@ -470,6 +471,7 @@ function err(){
# Don't print diffs
function err1(){
stty $STTYSETTINGS >/dev/null
echo -e "\e[31m\nError in Test$testnr [$testname]:"
if [ $# -gt 0 ]; then
echo "Expected: $1"
@ -601,9 +603,10 @@ function wait_backend(){
# Start restconf daemon
# @see wait_restconf
function start_restconf(){
# remove -g
local clixon_restconf_="${clixon_restconf#sudo -g * }"
# Start in background
# echo "sudo -u $wwwstartuser $clixon_restconf_ $RCLOG -D $DBG $*"
# echo "sudo -u $wwwstartuser ${clixon_restconf_} $RCLOG -D $DBG $*"
sudo -u $wwwstartuser $clixon_restconf_ $RCLOG -D $DBG $* </dev/null &>/dev/null &
if [ $? -ne 0 ]; then
err1 "expected 0" "$?"