Fix Pipeline

This commit is contained in:
Amin Ben Romdhane 2025-02-21 14:07:19 +00:00 committed by IOPSYS Dev
parent 598cb53994
commit 6e80cefd00
No known key found for this signature in database
8 changed files with 42 additions and 5 deletions

View file

@ -13,6 +13,7 @@ stages:
- static_code_analysis
- pipeline_test
run_unit_test:
stage: pipeline_test
image: "${COMMON_IMAGE}"

View file

@ -7,8 +7,6 @@ ADD_DEFINITIONS(-D_GNU_SOURCE)
# Compile and install libcwmpdm.so
ADD_LIBRARY(cwmpdm SHARED datamodel.c)
INSTALL(DIRECTORY DESTINATION usr/share/bbfdm/plugins)
INSTALL(TARGETS cwmpdm LIBRARY DESTINATION usr/share/bbfdm/plugins)
# Copy libcwmpdm.so to the main repo
add_custom_command(

View file

@ -8,6 +8,11 @@ pwd
trap cleanup EXIT
trap cleanup SIGINT
echo "Add X_IOPSYS_EU_Dropbear Object that is needed for functional test"
DROPBEAR_OBJECT='{"parent_dm": "Device.", "object": "X_IOPSYS_EU_Dropbear"}'
jq --argjson newObj "$DROPBEAR_OBJECT" '.daemon.services += [$newObj]' "/etc/bbfdm/services/core.json" > /tmp/updated_core.json
mv /tmp/updated_core.json /etc/bbfdm/services/core.json
echo "Compiling icmwp"
build_icwmp

View file

@ -2,6 +2,10 @@
priority=3
command=/bin/bash -c "cd /tmp/firmware/ && python3 -m http.server 80"
[program:icwmp]
priority=12
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-icwmp-report.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes --leak-resolution=high --show-error-list=yes --child-silent-after-fork=yes /usr/sbin/dm-service -m icwmp"
[program:bbfdmd]
priority=15
command=/bin/bash -c "/usr/sbin/bbfdmd"

View file

@ -6,6 +6,7 @@ pwd
[ -d "/opt/dev/bbfdm" ] && cd /opt/dev/bbfdm && ./gitlab-ci/setup.sh && cd -
cp -rf ./test/files/* /
echo "set ACS url in cwmp uci"
url="http://acs:7547"
uci set cwmp.acs.url=$url

View file

@ -126,6 +126,7 @@ function build_icwmp()
exec_cmd make install
[ -f "/usr/sbin/icwmpd" ] && rm /usr/sbin/icwmpd
exec_cmd ln -s ${BINP}/src/icwmpd /usr/sbin/icwmpd
exec_cmd ln -s ${BINP}/bbf_plugin/libcwmpdm.so /usr/share/bbfdm/micro_services/icwmp.so
cd ..
}

View file

@ -13,13 +13,15 @@ echo "Compiling icmwp"
build_icwmp
echo "Starting dependent services"
supervisorctl reread
supervisorctl update
sleep 2
supervisorctl restart all
sleep 2
sleep 5
supervisorctl stop icwmpd
sleep 5
supervisorctl status all
ubus wait_for bbfdm
echo "Clean cmocka"

View file

@ -0,0 +1,25 @@
{
"daemon": {
"enable": "1",
"service_name": "icwmp",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "ManagementServer"
},
{
"parent_dm": "Device.",
"object": "CWMPManagementServer",
"proto": "usp"
},
{
"parent_dm": "Device.",
"object": "XMPP"
}
],
"config": {
"loglevel": "3"
}
}
}