mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Fix Pipeline
This commit is contained in:
parent
598cb53994
commit
6e80cefd00
8 changed files with 42 additions and 5 deletions
|
|
@ -13,6 +13,7 @@ stages:
|
|||
- static_code_analysis
|
||||
- pipeline_test
|
||||
|
||||
|
||||
run_unit_test:
|
||||
stage: pipeline_test
|
||||
image: "${COMMON_IMAGE}"
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 ..
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
25
test/files/etc/bbfdm/services/icwmp.json
Normal file
25
test/files/etc/bbfdm/services/icwmp.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue