CI: coverity: simplify debugging options

We used to rely on a call to "sed" to modify the DEBUG option in the
makefile when running under Coverity because it splits words around
spaces and does not allow to pass multi-word build options. As reported
by Tim in issue #1592, this broke with commit 8de7f2822 ("BUILD: makefile:
enable both DEBUG_STRICT and DEBUG_MEMORY_POOLS by default") when the
default DEBUG options changed.

Let's change this to pass all DEBUG options one at a time instead and
get rid of this sed.
This commit is contained in:
Willy Tarreau 2022-03-04 10:12:40 +01:00
parent 3dfb7da04b
commit d8ac3f5dbf
1 changed files with 3 additions and 7 deletions

View File

@ -20,7 +20,9 @@ jobs:
COVERITY_SCAN_PROJECT_NAME: 'Haproxy'
COVERITY_SCAN_BRANCH_PATTERN: '*'
COVERITY_SCAN_NOTIFICATION_EMAIL: 'chipitsine@gmail.com'
COVERITY_SCAN_BUILD_COMMAND: "make CC=clang TARGET=linux-glibc USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_QUIC=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=addons/wurfl/dummy WURFL_LIB=addons/wurfl/dummy USE_DEVICEATLAS=1 DEVICEATLAS_SRC=addons/deviceatlas/dummy USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/pattern ADDLIB=\"-Wl,-rpath,$HOME/opt/lib/\" SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include"
# We cannot pass the DEBUG at once here because Coverity splits
# parameters at whitespaces, without taking quoting into account.
COVERITY_SCAN_BUILD_COMMAND: "make CC=clang TARGET=linux-glibc USE_ZLIB=1 USE_PCRE=1 USE_PCRE_JIT=1 USE_LUA=1 USE_OPENSSL=1 USE_QUIC=1 USE_SYSTEMD=1 USE_WURFL=1 WURFL_INC=addons/wurfl/dummy WURFL_LIB=addons/wurfl/dummy USE_DEVICEATLAS=1 DEVICEATLAS_SRC=addons/deviceatlas/dummy USE_51DEGREES=1 51DEGREES_SRC=addons/51degrees/dummy/pattern ADDLIB=\"-Wl,-rpath,$HOME/opt/lib/\" SSL_LIB=${HOME}/opt/lib SSL_INC=${HOME}/opt/include DEBUG+=-DDEBUG_STRICT=1 DEBUG+=-DDEBUG_USE_ABORT=1"
steps:
- uses: actions/checkout@v2
- name: Install apt dependencies
@ -32,12 +34,6 @@ jobs:
- name: Install QUICTLS
run: |
QUICTLS=yes scripts/build-ssl.sh
- name: Hijack Makefile
run: |
# We cannot pass the DEBUG variable in `COVERITY_SCAN_BUILD_COMMAND`,
# because Coverity splits parameters at whitespaces, without taking
# quoting into account.
sed -i 's/^DEBUG =$/DEBUG = -DDEBUG_STRICT=1 -DDEBUG_USE_ABORT=1/' Makefile
- name: Build WURFL
run: make -C addons/wurfl/dummy
- name: Run Coverity Scan