From 6a64707419aec23cfc87b8651e8ea8f6d929943d Mon Sep 17 00:00:00 2001 From: Vivek Kumar Dutta Date: Tue, 18 Apr 2023 16:26:33 +0530 Subject: [PATCH] Update ci paths --- .gitlab-ci.yml | 7 +++---- README.md | 2 +- gitlab-ci/functional-api-test.sh | 3 --- gitlab-ci/functional-test.sh | 2 -- gitlab-ci/iopsys-supervisord.conf | 2 +- gitlab-ci/shared.sh | 11 +++++++---- mkdocs.yml | 2 +- test/cmocka/Makefile | 5 ++--- 8 files changed, 15 insertions(+), 19 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 207a500..069cf1b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/README.md b/README.md index fd5af38..2bffe0a 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/gitlab-ci/functional-api-test.sh b/gitlab-ci/functional-api-test.sh index 923a92b..49fcfda 100755 --- a/gitlab-ci/functional-api-test.sh +++ b/gitlab-ci/functional-api-test.sh @@ -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 diff --git a/gitlab-ci/functional-test.sh b/gitlab-ci/functional-test.sh index baa1342..3563782 100755 --- a/gitlab-ci/functional-test.sh +++ b/gitlab-ci/functional-test.sh @@ -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 diff --git a/gitlab-ci/iopsys-supervisord.conf b/gitlab-ci/iopsys-supervisord.conf index f0c86de..0fae640 100644 --- a/gitlab-ci/iopsys-supervisord.conf +++ b/gitlab-ci/iopsys-supervisord.conf @@ -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" diff --git a/gitlab-ci/shared.sh b/gitlab-ci/shared.sh index ad92799..6420101 100644 --- a/gitlab-ci/shared.sh +++ b/gitlab-ci/shared.sh @@ -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 "UninitCondition" memory-report.xml + grep -q "UninitCondition" /tmp/memory-report.xml error_on_zero $? echo "checking Leak_PossiblyLost" - grep -q "Leak_PossiblyLost" memory-report.xml + grep -q "Leak_PossiblyLost" /tmp/memory-report.xml error_on_zero $? echo "checking Leak_DefinitelyLost" - grep -q "Leak_DefinitelyLost" memory-report.xml + grep -q "Leak_DefinitelyLost" /tmp/memory-report.xml error_on_zero $? echo "checking Leak_StillReachable" - grep -q "Leak_StillReachable" memory-report.xml + grep -q "Leak_StillReachable" /tmp/memory-report.xml error_on_zero $? } diff --git a/mkdocs.yml b/mkdocs.yml index f149b11..3781903 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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" diff --git a/test/cmocka/Makefile b/test/cmocka/Makefile index ecb9f3b..ef2bb9a 100644 --- a/test/cmocka/Makefile +++ b/test/cmocka/Makefile @@ -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