- Fixed: [xml2txt last param not used #204](https://github.com/clicon/clixon/issues/204)
- test: coverage test scripts for CI
This commit is contained in:
parent
e9b07cebab
commit
1d29d29415
5 changed files with 37 additions and 5 deletions
30
test/cicd/coverage.sh
Executable file
30
test/cicd/coverage.sh
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
# Run coverage using codecov
|
||||
# Assume pwd is in top-level srcdir
|
||||
|
||||
set -eux
|
||||
|
||||
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
|
||||
|
||||
# Build
|
||||
sh ./test/cicd/clixon-mk.sh
|
||||
|
||||
# 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)
|
||||
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) -f '!clixon_util*' -f '!example' -t ${TOKEN}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue