Fixed static linking for coverage and fuzzing
Preparations for Clixon 5.3 release
This commit is contained in:
parent
5a875e3152
commit
51278d5901
12 changed files with 83 additions and 68 deletions
|
|
@ -8,25 +8,36 @@ if [ $# -ne 1 ]; then
|
|||
echo "usage: $0 <token>"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
TOKEN=$1
|
||||
|
||||
# LINKAGE=static
|
||||
# Configure (clixon)
|
||||
LDFLAGS=-coverage CFLAGS="-O2 -Wall -coverage" ./configure --with-restconf=native
|
||||
CFLAGS="-g -Wall" INSTALLFLAGS="" ./configure
|
||||
sudo ldconfig
|
||||
LDFLAGS=-coverage LINKAGE=static CFLAGS="-g -Wall -coverage" INSTALLFLAGS="" ./configure
|
||||
|
||||
# Build
|
||||
sh ./test/cicd/clixon-mk.sh
|
||||
make clean
|
||||
make -j10
|
||||
sudo make install
|
||||
sudo make install-include
|
||||
(cd example; make)
|
||||
(cd util; make)
|
||||
(cd example; sudo make install)
|
||||
(cd util; sudo make install)
|
||||
|
||||
# Kludge to run restconf as root, and touch all gcda files, cant do as wwwuser
|
||||
(cd test; clixon_restconf="/www-data/clixon_restconf -r" ./test_api.sh)
|
||||
# Kludge for netconf to add as non-root
|
||||
(cd test; ./test_netconf_hello.sh)
|
||||
find . -name "*.gcda" | xargs sudo chmod 777
|
||||
# Run all tests
|
||||
(cd test; ./sum.sh)
|
||||
|
||||
#GITHUB_SHA=
|
||||
# Push upstream
|
||||
# The -f dont seem to work
|
||||
bash <(curl -s https://codecov.io/bash) -t ${TOKEN}
|
||||
(cd test; clixon_restconf="clixon_restconf -r" ./sum.sh)
|
||||
|
||||
# Push coverage
|
||||
# PUSH $TOKEN
|
||||
|
||||
# remove all coverage files (after gcov push)
|
||||
find . -name "*.gcda" | xargs rm
|
||||
|
||||
sleep 1 # ensure OK is last
|
||||
echo OK
|
||||
|
|
|
|||
|
|
@ -229,8 +229,9 @@ expectpart "$($clixon_cli -1 -f $cfg -l o discard)" 0 ""
|
|||
new "expand identityref 2nd level"
|
||||
expectpart "$(echo "set identityrefs2 identityref ?" | $clixon_cli -f $cfg 2> /dev/null)" 0 "ex:des" "ex:des2" "ex:des3"
|
||||
|
||||
# Note CI may have random number as host which may match "92"
|
||||
new "expand leafref 2nd level"
|
||||
expectpart "$(echo "set leafrefs2 leafref ?" | $clixon_cli -f $cfg 2> /dev/null)" 0 "91" "93" --not-- "92"
|
||||
expectpart "$(echo "set leafrefs2 leafref ?" | $clixon_cli -f $cfg 2> /dev/null)" 0 " 91" " 93" --not-- " 92"
|
||||
|
||||
new "set identityref2 des"
|
||||
expectpart "$($clixon_cli -1 -f $cfg set identityrefs2 identityref ex:des)" 0 "^$"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ s="$_" ; . ./lib.sh || if [ "$s" = $0 ]; then exit 0; else return 0; fi
|
|||
# Eg on FreeBSD use gmake
|
||||
: ${make:=make}
|
||||
|
||||
|
||||
# Check for soft links for .so files in case of dynamic linkage, but .a files f static linking
|
||||
if [ ${LINKAGE} = static ]; then
|
||||
LIBOPT=-f
|
||||
|
|
@ -18,10 +17,13 @@ fi
|
|||
new "Set up installdir $dir"
|
||||
|
||||
new "Make DESTDIR install ($dir)"
|
||||
|
||||
# Not for static linkage, libcligen.a may be taken from elsewhere
|
||||
(cd ..; $make DESTDIR=$dir install)
|
||||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
|
||||
new "Check installed files /usr"
|
||||
if [ ! -d $dir/usr ]; then
|
||||
err $dir/usr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue