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

fix pipeline

parent b7656aa6
Branches
No related tags found
1 merge request!13fix pipeline
Pipeline #124768 passed
include: include:
- project: 'iopsys/gitlab-ci-pipeline' - project: 'iopsys/gitlab-ci-pipeline'
file: '/static-code-analysis.yml' file: '/static-code-analysis.yml'
ref: '0.28' ref: '0.31'
stages: stages:
- static_code_analysis - static_code_analysis
...@@ -13,11 +13,11 @@ stages: ...@@ -13,11 +13,11 @@ stages:
variables: variables:
DEBUG: 'TRUE' DEBUG: 'TRUE'
SOURCE_FOLDER: "." 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/" CPPCHECK_OPTIONS: "--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: run_compile_test:
stage: compile_test stage: compile_test
image: ${COMMON_IMAGE} image: dev.iopsys.eu:5050/iopsys/gitlab-ci-pipeline/code-analysis
allow_failure: false allow_failure: false
script: script:
- "./gitlab-ci/install-dependencies.sh" - "./gitlab-ci/install-dependencies.sh"
... ...
......
...@@ -245,7 +245,7 @@ static int bcm_eth_get_stats_from_proc(const char *ifname, struct eth_stats *s) ...@@ -245,7 +245,7 @@ static int bcm_eth_get_stats_from_proc(const char *ifname, struct eth_stats *s)
return -1; return -1;
ptr = cmdbuf + strlen(ifname) + strlen(":"); ptr = cmdbuf + strlen(ifname) + strlen(":");
ret = sscanf(ptr, ret = sscanf(ptr, /* Flawfinder: ignore */
" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
... ...
......
...@@ -89,7 +89,7 @@ static int get_drv_info_by_ifname(char *ifname, char *buffer) ...@@ -89,7 +89,7 @@ static int get_drv_info_by_ifname(char *ifname, char *buffer)
if (ioctl(fd, SIOCETHTOOL, &ifr) != 0) if (ioctl(fd, SIOCETHTOOL, &ifr) != 0)
goto exit; goto exit;
strcpy(buffer, info.driver); strncpy(buffer, info.driver, DRIVER_NAME_LEN - 1);
ret = 0; ret = 0;
exit: exit:
... ...
......
...@@ -2,25 +2,11 @@ ...@@ -2,25 +2,11 @@
echo "install dependencies" 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 # libeasy.so
rm -fr libeasy rm -fr libeasy
mkdir -p /usr/include/easy mkdir -p /usr/include/easy
exec_cmd git clone -b devel https://dev.iopsys.eu/hal/libeasy.git git clone -b devel https://dev.iopsys.eu/hal/libeasy.git
cd libeasy cd libeasy
exec_cmd make CFLAGS+="-I/usr/include/libnl3" make
exec_cmd cp -a libeasy*.so* /usr/lib 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/ cp -a *.h /usr/include/easy/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment