diff --git a/CHANGELOG.md b/CHANGELOG.md index c8193af4..e3f1fb21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -79,10 +79,12 @@ The 5.1 release contains more RESTCONF native mode restructuring, new multi-yang Developers may need to change their code +* `str2cvec`: Renamed to `uri_str2cvec` and added a decode parameter: + * To keep existing semantics: `str2cvec(...,cvp) -> str2cvec(...,1, cvp)` * Removed `cli_debug()`. Use `cli_debug_backend()` or `cli_debug_restconf()` instead. * Removed `yspec_free()` - replace with `ys_free()` -* Added xerr output parameter to `xmldb_get0()` -* Removed `endtag` parameter of `clixon_xml_parse_file()` +* `xmldb_get0()`: Added xerr output parameter to +* `clixon_xml_parse_file()`: Removed `endtag` parameter. * Restconf authentication callback (ca_auth) signature changed (again) * Minor modification to 5.0 change: userp removed. * New version is: `int ca_auth(h, req, auth_type, authp)`, where diff --git a/lib/src/clixon_plugin.c b/lib/src/clixon_plugin.c index ffdfbc07..61a23a0e 100644 --- a/lib/src/clixon_plugin.c +++ b/lib/src/clixon_plugin.c @@ -962,7 +962,7 @@ upgrade_callback_reg_fn(clicon_handle h, const char *ns, void *arg) { - upgrade_callback_t *uc; + upgrade_callback_t *uc = NULL; plugin_module_struct *ms = plugin_module_struct_get(h); if (ms == NULL){ diff --git a/lib/src/clixon_xml_map.c b/lib/src/clixon_xml_map.c index 848f4ebf..ca5fa16f 100644 --- a/lib/src/clixon_xml_map.c +++ b/lib/src/clixon_xml_map.c @@ -208,7 +208,7 @@ xml2txt(FILE *f, cxobj *x, int level) { - return xml2txt_recurse(f, x, fprintf, 0); + return xml2txt_recurse(f, x, fprintf, level); } /*! Translate from XML to CLI commands diff --git a/test/cicd/cicd.sh b/test/cicd/cicd.sh index 0c750b21..649151dc 100755 --- a/test/cicd/cicd.sh +++ b/test/cicd/cicd.sh @@ -19,7 +19,7 @@ # # Typical run: ./cicd.sh 2>&1 | tee cilog -set -eux # x +set -eux if [ $# -ne 2 ]; then echo "usage: $0 " diff --git a/test/cicd/coverage.sh b/test/cicd/coverage.sh new file mode 100755 index 00000000..5729c4bb --- /dev/null +++ b/test/cicd/coverage.sh @@ -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 " + 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} +