Update ci paths

This commit is contained in:
Vivek Kumar Dutta 2023-04-18 16:26:33 +05:30
parent 9db8e0f900
commit 6a64707419
8 changed files with 15 additions and 19 deletions

View file

@ -34,7 +34,7 @@ run_unit_test:
when: always
paths:
- timestamp
- memory-report.xml
- /tmp/memory-report.xml
- unit-test-coverage.xml
run_api_test:
@ -53,7 +53,7 @@ run_api_test:
paths:
- timestamp
- api-test-coverage.xml
- api-test-memory-report.xml
- /tmp/memory-report.xml
- api-test-result.log
run_functional_test:
@ -72,9 +72,8 @@ run_functional_test:
paths:
- timestamp
- funl-test-coverage.xml
- funl-test-memory-report.xml
- funl-test-result.log
- funl-test-debug.log
- memory-report.xml
- /tmp/memory-report.xml
- memory-report-download.xml
- icwmpd_debug.txt

View file

@ -90,4 +90,4 @@ Runtime dependencies:
| Dependency | Link | License |
| ----------- | ------------------------------------------- | -------------- |
| ubus | https://git.openwrt.org/project/ubus.git | LGPL 2.1 |
| bbfdm | https://dev.iopsys.eu/bbf/bbfdm.git | LGPLv2.1 |
| bbfdm | https://dev.iopsys.eu/bbf/bbfdm.git | BSD-3 |

View file

@ -13,7 +13,6 @@ build_icwmp
mkdir -p /var/state/icwmpd
echo "Starting dependent services"
supervisorctl update
sleep 2
supervisorctl restart all
sleep 10
supervisorctl status all
@ -36,8 +35,6 @@ gcovr -r . 2> /dev/null --xml -o ./api-test-coverage.xml
#GitLab-CI output
gcovr -r . 2> /dev/null
cp ./memory-report.xml ./api-test-memory-report.xml
#report part
exec_cmd tap-junit --input ./api-test-result.log --output report

View file

@ -89,8 +89,6 @@ gcovr -r . 2> /dev/null --xml -o ./funl-test-coverage.xml
#GitLab-CI output
gcovr -r . 2> /dev/null
cp ./memory-report.xml ./funl-test-memory-report.xml
#report part
exec_cmd tap-junit --input ./funl-test-result.log --output report

View file

@ -59,5 +59,5 @@ autorestart=false
startretries=0
numprocs_start=10
priority=11
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/builds/bbf/icwmp/memory-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/bbf/icwmp/icwmpd"
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /usr/sbin/icwmpd"

View file

@ -116,6 +116,7 @@ function build_icwmp()
COV_CFLAGS='-g -O0 -fprofile-arcs -ftest-coverage'
COV_LDFLAGS='--coverage'
BINP="${PWD}"
# clean icwmp
clean_icwmp
@ -129,6 +130,8 @@ function build_icwmp()
exec_cmd cp icwmpd ../
exec_cmd cp libcwmpdm.so ../
exec_cmd make install
[ -f "/usr/sbin/icwmpd" ] && rm /usr/sbin/icwmpd
exec_cmd ln -s ${BINP}/icwmpd /usr/sbin/icwmpd
cd ..
}
@ -150,18 +153,18 @@ function install_bbfdmd()
function check_valgrind_xml() {
echo "Checking memory leaks..."
echo "checking UninitCondition"
grep -q "<kind>UninitCondition</kind>" memory-report.xml
grep -q "<kind>UninitCondition</kind>" /tmp/memory-report.xml
error_on_zero $?
echo "checking Leak_PossiblyLost"
grep -q "<kind>Leak_PossiblyLost</kind>" memory-report.xml
grep -q "<kind>Leak_PossiblyLost</kind>" /tmp/memory-report.xml
error_on_zero $?
echo "checking Leak_DefinitelyLost"
grep -q "<kind>Leak_DefinitelyLost</kind>" memory-report.xml
grep -q "<kind>Leak_DefinitelyLost</kind>" /tmp/memory-report.xml
error_on_zero $?
echo "checking Leak_StillReachable"
grep -q "<kind>Leak_StillReachable</kind>" memory-report.xml
grep -q "<kind>Leak_StillReachable</kind>" /tmp/memory-report.xml
error_on_zero $?
}

View file

@ -1,4 +1,4 @@
site_name: TR-x69
site_name: TR-x69 CWMP
site_url: https://dev.iopsys.eu/bbf/icwmp
edit_uri: "https://dev.iopsys.eu/bbf/icwmp"

View file

@ -6,7 +6,7 @@ LIB_LDFLAGS:= -lmxml -luci -lblobmsg_json -lubox\
LIB_CFLAGS:= -fPIC -I../../ -DLOPENSSL -g -O0
UNIT_TESTS:= icwmp_unit_testd
VALGRIND = /usr/bin/valgrind --xml=yes --xml-file=memory-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all
VALGRIND = /usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all
ICWMP_OBJS=$(patsubst ../../src/%.c, %.o, $(wildcard ../../src/*.c))
TEST_SRCS = $(wildcard *.c)
@ -27,10 +27,9 @@ icwmp_unit_testd:
all: libunit ${UNIT_TESTS}
$(VALGRIND) ./${UNIT_TESTS}
mv memory-report.xml ../../
echo "All test done"
clean:
rm -rf *.o libicwmp.so ${UNIT_TESTS} memory-report.xml
rm -rf *.o libicwmp.so ${UNIT_TESTS} /tmp/memory-report.xml
.PHONY: clean unit-test