Fix pipeline

This commit is contained in:
Vivek Kumar Dutta 2025-01-17 17:53:47 +05:30
parent 9c465c36d2
commit 7c2b2fe412
14 changed files with 71 additions and 220 deletions

View file

@ -40,7 +40,6 @@ run_tools_test:
allow_failure: false
script:
- "./gitlab-ci/pipeline_setup.sh"
- "./gitlab-ci/install-unified-dependencies.sh"
- "./gitlab-ci/setup.sh ms"
- "./gitlab-ci/tools-test.sh"
- "./gitlab-ci/generate_supported_dm.sh"

View file

@ -16,6 +16,8 @@ if [ -n "${CI_SERVER_HOST}" ]; then
fi
install_cmph
install_libeasy
install_libethernet
# Make sure that all plugins are removed
[ ! -d "${BBFDM_PLUGIN_DIR}" ] && mkdir -p "${BBFDM_PLUGIN_DIR}"

View file

@ -38,4 +38,6 @@ else
#install Network Data Model as a micro-service
echo "Installing Network Data Model (netmngr) as a micro-service"
install_netmngr_as_micro_service
install_ethmngr_as_micro_service
fi

View file

@ -1,30 +0,0 @@
#!/bin/bash
echo "install unified daemon dependencies"
source ./gitlab-ci/shared.sh
dst=$(pwd)
# libeasy for ethmngr
cd /opt/dev
rm -fr libeasy
mkdir -p /usr/include/easy
git clone -b devel https://dev.iopsys.eu/iopsys/libeasy.git
cd libeasy
make
cp -a libeasy*.so* /usr/lib
cp -a *.h /usr/include/easy/
# libethernet for ethmngr
cd /opt/dev
rm -fr libethernet
git clone -b devel https://dev.iopsys.eu/iopsys/libethernet.git
cd libethernet
make PLATFORM=TEST
cp ethernet.h /usr/include
cp -a libethernet*.so* /usr/lib
sudo ldconfig
cd ${dst}
pwd

View file

@ -1,4 +1,4 @@
[program:sysmng]
[program:sysmngr]
priority=5
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-sysmngr-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/sysmngr"
@ -9,3 +9,7 @@ command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-netmngr
[program:wifidmd]
priority=7
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-wifidmd-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 wifidmd"
[program:ethmngr]
priority=10
command=/bin/bash -c "/usr/bin/valgrind --xml=yes --xml-file=/tmp/memory-ethmngr-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/ethmngr"

View file

@ -134,13 +134,55 @@ function install_wifidmd_as_micro_service()
generate_input_schema_with_output_name "wifidmd" "WiFi" > /etc/bbfdm/services/wifidmd.json
}
function install_libeasy()
{
[ -d "/opt/dev/libeasy" ] && return 0
exec_cmd git clone https://dev.iopsys.eu/iopsys/libeasy.git /opt/dev/libeasy
(
cd /opt/dev/libeasy
exec_cmd make
mkdir -p /usr/include/easy
cp -a libeasy*.so* /usr/lib
cp -a *.h /usr/include/easy/
)
}
function install_libethernet()
{
[ -d "/opt/dev/libethernet" ] && return 0
exec_cmd git clone https://dev.iopsys.eu/iopsys/libethernet.git /opt/dev/libethernet
(
cd /opt/dev/libethernet
make PLATFORM=TEST
cp ethernet.h /usr/include
cp -a libethernet*.so* /usr/lib
sudo ldconfig
)
}
function install_ethmngr_as_micro_service()
{
[ -d "/opt/dev/ethmngr" ] && return 0
install_libeasy
install_libethernet
exec_cmd git clone https://dev.iopsys.eu/hal/ethmngr.git /opt/dev/ethmngr
exec_cmd make -C /opt/dev/ethmngr
exec_cmd cp /opt/dev/ethmngr/ethmngr /usr/sbin/ethmngr
}
function install_netmngr_as_micro_service()
{
[ -d "/opt/dev/netmngr" ] && return 0
exec_cmd git clone https://dev.iopsys.eu/network/netmngr.git /opt/dev/netmngr
exec_cmd make -C /opt/dev/netmngr/src/ clean && make -C /opt/dev/netmngr/src/ CFLAGS="-D'BBF_VENDOR_PREFIX=\"X_IOPSYS_EU_\"'"
exec_cmd make -C /opt/dev/netmngr/src/ clean
exec_cmd make -C /opt/dev/netmngr/src/ NETMNGR_GRE_OBJ=y NETMNGR_IP_OBJ=y NETMNGR_ROUTING_OBJ=y NETMNGR_PPP_OBJ=y NETMNGR_ROUTER_ADVERTISEMENT_OBJ=y NETMNGR_IPV6RD_OBJ=y
exec_cmd cp -f /opt/dev/netmngr/src/libnetmngr.so /usr/share/bbfdm/micro_services/netmngr.so
exec_cmd cp -f /opt/dev/netmngr/src/libinterface_stack.so /usr/share/bbfdm/plugins
exec_cmd mkdir -p /usr/share/bbfdm/micro_services/netmngr
@ -211,7 +253,7 @@ function generate_report()
function install_cmph()
{
[ -d "/opt/dev/cmph" ] && rm -rf /opt/dev/cmph
[ -d "/opt/dev/cmph" ] && return 0
exec_cmd git clone https://git.code.sf.net/p/cmph/git /opt/dev/cmph
(
@ -222,3 +264,4 @@ function install_cmph()
exec_cmd sudo make install
)
}

View file

@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "ethmngr",
"unified_daemon": true,
"services": [
{
"parent_dm": "Device.",
"object": "Ethernet"
}
],
"config": {
"loglevel": "3"
}
}
}

View file

@ -1,31 +0,0 @@
{
"ifname": "eth0",
"tx_priority_q": -1,
"tx_bytes": 0,
"tx_packets": 0,
"tx_broadcast_packets": 0,
"tx_multicast_packets": 0,
"tx_crc_error_packets": 0,
"tx_undersize_packets": 0,
"tx_oversize_packets": 0,
"tx_packets_64bytes": 0,
"tx_packets_65to127bytes": 0,
"tx_packets_128to255bytes": 0,
"tx_packets_256to511bytes": 0,
"tx_packets_512to1023bytes": 0,
"tx_packets_1024to1518bytes": 0,
"rx_bytes": 0,
"rx_packets": 0,
"rx_broadcast_packets": 0,
"rx_multicast_packets": 0,
"rx_crc_error_packets": 0,
"rx_undersize_packets": 0,
"rx_oversize_packets": 0,
"rx_packets_64bytes": 0,
"rx_packets_65to127bytes": 0,
"rx_packets_128to255bytes": 0,
"rx_packets_256to511bytes": 0,
"rx_packets_512to1023bytes": 0,
"rx_packets_1024to1518bytes": 0
}

View file

@ -1,31 +0,0 @@
{
"ifname": "eth1",
"tx_priority_q": -1,
"tx_bytes": 0,
"tx_packets": 0,
"tx_broadcast_packets": 0,
"tx_multicast_packets": 0,
"tx_crc_error_packets": 0,
"tx_undersize_packets": 0,
"tx_oversize_packets": 0,
"tx_packets_64bytes": 0,
"tx_packets_65to127bytes": 0,
"tx_packets_128to255bytes": 0,
"tx_packets_256to511bytes": 0,
"tx_packets_512to1023bytes": 0,
"tx_packets_1024to1518bytes": 0,
"rx_bytes": 0,
"rx_packets": 0,
"rx_broadcast_packets": 0,
"rx_multicast_packets": 0,
"rx_crc_error_packets": 0,
"rx_undersize_packets": 0,
"rx_oversize_packets": 0,
"rx_packets_64bytes": 0,
"rx_packets_65to127bytes": 0,
"rx_packets_128to255bytes": 0,
"rx_packets_256to511bytes": 0,
"rx_packets_512to1023bytes": 0,
"rx_packets_1024to1518bytes": 0
}

View file

@ -1,31 +0,0 @@
{
"ifname": "eth2",
"tx_priority_q": -1,
"tx_bytes": 338808,
"tx_packets": 2268,
"tx_broadcast_packets": 377,
"tx_multicast_packets": 1104,
"tx_crc_error_packets": 0,
"tx_undersize_packets": 0,
"tx_oversize_packets": 0,
"tx_packets_64bytes": 666,
"tx_packets_65to127bytes": 1291,
"tx_packets_128to255bytes": 196,
"tx_packets_256to511bytes": 16,
"tx_packets_512to1023bytes": 16,
"tx_packets_1024to1518bytes": 83,
"rx_bytes": 245770,
"rx_packets": 2410,
"rx_broadcast_packets": 0,
"rx_multicast_packets": 797,
"rx_crc_error_packets": 0,
"rx_undersize_packets": 0,
"rx_oversize_packets": 0,
"rx_packets_64bytes": 392,
"rx_packets_65to127bytes": 1724,
"rx_packets_128to255bytes": 289,
"rx_packets_256to511bytes": 1,
"rx_packets_512to1023bytes": 1,
"rx_packets_1024to1518bytes": 3
}

View file

@ -1,31 +0,0 @@
{
"ifname": "eth3",
"tx_priority_q": -1,
"tx_bytes": 0,
"tx_packets": 0,
"tx_broadcast_packets": 0,
"tx_multicast_packets": 0,
"tx_crc_error_packets": 0,
"tx_undersize_packets": 0,
"tx_oversize_packets": 0,
"tx_packets_64bytes": 0,
"tx_packets_65to127bytes": 0,
"tx_packets_128to255bytes": 0,
"tx_packets_256to511bytes": 0,
"tx_packets_512to1023bytes": 0,
"tx_packets_1024to1518bytes": 0,
"rx_bytes": 0,
"rx_packets": 0,
"rx_broadcast_packets": 0,
"rx_multicast_packets": 0,
"rx_crc_error_packets": 0,
"rx_undersize_packets": 0,
"rx_oversize_packets": 0,
"rx_packets_64bytes": 0,
"rx_packets_65to127bytes": 0,
"rx_packets_128to255bytes": 0,
"rx_packets_256to511bytes": 0,
"rx_packets_512to1023bytes": 0,
"rx_packets_1024to1518bytes": 0
}

View file

@ -1,31 +0,0 @@
{
"ifname": "eth4",
"tx_priority_q": -1,
"tx_bytes": 0,
"tx_packets": 0,
"tx_broadcast_packets": 0,
"tx_multicast_packets": 0,
"tx_crc_error_packets": 0,
"tx_undersize_packets": 0,
"tx_oversize_packets": 0,
"tx_packets_64bytes": 0,
"tx_packets_65to127bytes": 0,
"tx_packets_128to255bytes": 0,
"tx_packets_256to511bytes": 0,
"tx_packets_512to1023bytes": 0,
"tx_packets_1024to1518bytes": 0,
"rx_bytes": 0,
"rx_packets": 0,
"rx_broadcast_packets": 0,
"rx_multicast_packets": 0,
"rx_crc_error_packets": 0,
"rx_undersize_packets": 0,
"rx_oversize_packets": 0,
"rx_packets_64bytes": 0,
"rx_packets_65to127bytes": 0,
"rx_packets_128to255bytes": 0,
"rx_packets_256to511bytes": 0,
"rx_packets_512to1023bytes": 0,
"rx_packets_1024to1518bytes": 0
}

View file

@ -1,30 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
case "$1" in
list)
echo '{ "rmonstats" : {"ifname":"str"} }'
;;
call)
case "$2" in
rmonstats)
read input;
json_load "$input"
json_get_var ifname ifname
if [ "$ifname" = "eth1" ]; then
cat /tmp/rmonstats_eth1.data 2>/dev/null
elif [ "$ifname" = "eth2" ]; then
cat /tmp/rmonstats_eth2.data 2>/dev/null
elif [ "$ifname" = "eth3" ]; then
cat /tmp/rmonstats_eth3.data 2>/dev/null
elif [ "$ifname" = "eth4" ]; then
cat /tmp/rmonstats_eth4.data 2>/dev/null
else
cat /tmp/rmonstats_eth0.data 2>/dev/null
fi
;;
esac
;;
esac

View file

@ -427,7 +427,7 @@
"src/ppp.c",
"src/routeradvertisement.c",
"src/routing.c",
"src/ipv6rd.c"
"src/ipv6rd.c",
"src/common.c"
]
},