Skip to content
Snippets Groups Projects
Commit d777636c authored by Rahul Thakur's avatar Rahul Thakur
Browse files

libethernet: setup static code analysis

parent a64c8d1d
No related branches found
No related tags found
1 merge request!6libethernet: setup static code analysis
Pipeline #96923 passed
include:
- project: 'iopsys/gitlab-ci-pipeline'
file: '/static-code-analysis.yml'
ref: '0.28'
stages:
- static_code_analysis
- compile_test
#- unit_test
#- functional_test
#- api_test
variables:
DEBUG: 'TRUE'
SOURCE_FOLDER: "."
RUN_CPPCHECK: "cppcheck --enable=all --error-exitcode=1 --suppress=missingInclude --suppress=unusedFunction --suppress=unreadVariable --suppress=variableScope --suppress=redundantInitialization --suppress=unusedLabel --suppress=unusedStructMember --suppress=knownConditionTrueFalse --suppress=unmatchedSuppression -i test_stub/"
run_compile_test:
stage: compile_test
image: ${COMMON_IMAGE}
allow_failure: false
script:
- "./gitlab-ci/install-dependencies.sh"
- "./gitlab-ci/build.sh"
#!/bin/bash
set -e
echo "build stage"
pwd
make
#!/bin/bash
echo "install dependencies"
home=$(pwd)
function exec_cmd()
{
echo "executing $@"
$@ >/dev/null 2>&1
local ret=$?
if [ "${ret}" -ne 0 ]; then
echo "Failed to execute $@ ret (${ret})"
exit 1
fi
}
# libeasy.so
rm -fr libeasy
mkdir -p /usr/include/easy
exec_cmd git clone -b devel https://dev.iopsys.eu/hal/libeasy.git
cd libeasy
exec_cmd make CFLAGS+="-I/usr/include/libnl3"
exec_cmd cp -a libeasy*.so* /usr/lib
exec_cmd cp -a easy.h event.h utils.h if_utils.h debug.h hlist.h /usr/include/easy/
[program:ubusd]
priority=1
autorestart=false
startretries=0
command=/bin/bash -c "/usr/sbin/ubusd"
#!/bin/bash
echo "preparation script"
pwd
cp -r ./schemas/ubus/* /usr/share/rpcd/schemas
cp ./gitlab-ci/iopsys-supervisord.conf /etc/supervisor/conf.d/
ls /etc/config/
ls /usr/share/rpcd/schemas/
ls /etc/supervisor/conf.d/
......@@ -48,6 +48,7 @@ const struct eth_ops mtk_eth_ops = {
.ifname = "lan",
.get_stats = mtk_eth_get_stats,
.get_rmon_stats = mtk_eth_get_rmon_stats,
};
#elif defined(IOPSYS_LINUX)
const struct eth_ops linux_eth_ops = {
.ifname = "eth",
......@@ -58,5 +59,5 @@ const struct eth_ops linux_eth_ops = {
.reset_phy = linux_eth_reset_phy,
.get_stats = linux_eth_get_stats,
.get_rmon_stats = linux_eth_get_rmon_stats,
#endif
};
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment