Fixed static variant of test_static.sh

This commit is contained in:
Olof hagsand 2022-01-02 20:42:50 +01:00
parent 50ac510803
commit f92e9609dc
2 changed files with 9 additions and 1 deletions

View file

@ -81,5 +81,6 @@ CFLAGS="@CFLAGS@"
LINKAGE=@LINKAGE@ LINKAGE=@LINKAGE@
SH_SUFFIX=@SH_SUFFIX@ SH_SUFFIX=@SH_SUFFIX@
LIBSTATIC_SUFFIX=@LIBSTATIC_SUFFIX@ LIBSTATIC_SUFFIX=@LIBSTATIC_SUFFIX@
LIBS="@LIBS@"
CLIXON_YANG_PATCH=@CLIXON_YANG_PATCH@ CLIXON_YANG_PATCH=@CLIXON_YANG_PATCH@
YANG_STANDARD_DIR=@YANG_STANDARD_DIR@ YANG_STANDARD_DIR=@YANG_STANDARD_DIR@

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Advanced Client api test # Advanced Client api test
# Compile and run a client # Compile and run a client
# INSTALLFLSAGS=""
# Magic line must be first in script (see README.md) # Magic line must be first in script (see README.md)
s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
@ -114,7 +115,13 @@ main(int argc,
EOF EOF
new "compile $cfile -> $app" new "compile $cfile -> $app"
expectpart "$($CC -g -Wall -I/usr/local/include $cfile -o $app -L /usr/local/lib -lclixon)" 0 "" if [ "$LINKAGE" = static ]; then
COMPILE="$CC ${CFLAGS} -I/usr/local/include $cfile -o $app /usr/local/lib/libclixon${LIBSTATIC_SUFFIX} ${LIBS}"
else
COMPILE="$CC ${CFLAGS} -I/usr/local/include $cfile -o $app -L /usr/local/lib -lclixon"
fi
echo "COMPILE:$COMPILE"
expectpart "$($COMPILE)" 0 ""
new "test params: -s init -f $cfg" new "test params: -s init -f $cfg"