- 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:
Olof hagsand 2021-04-20 10:26:48 +02:00
parent e9b07cebab
commit 1d29d29415
5 changed files with 37 additions and 5 deletions

View file

@ -19,7 +19,7 @@
#
# Typical run: ./cicd.sh 2>&1 | tee cilog
set -eux # x
set -eux
if [ $# -ne 2 ]; then
echo "usage: $0 <host> <restconf>"

30
test/cicd/coverage.sh Executable file
View 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}