Skip to content

Commit

Permalink
ci: run unit tests with ASAN
Browse files Browse the repository at this point in the history
Enable ASAN for clang jobs.
This can greatly help identify leaks and buffer overflows.
This patch is more a fyi, as some unit tests stil have issues.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
david-marchand authored and ovsrobot committed Sep 17, 2021
1 parent 6aaecee commit 26ea5fa
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .ci/linux-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,14 @@ fi

OPTS="$OPTS -Dmachine=default"
OPTS="$OPTS --default-library=$DEF_LIB"
OPTS="$OPTS --buildtype=debugoptimized"

if [ "$CC" != "${CC%%clang}" ] && [ "$RUN_TESTS" = 'true' ]; then
# Let's run tests with ASAN
OPTS="$OPTS -Db_sanitize=address -Db_lundef=false --buildtype=debug"
else
OPTS="$OPTS --buildtype=debugoptimized"
fi

OPTS="$OPTS -Dcheck_includes=true"
meson build --werror $OPTS
ninja -C build
Expand Down

0 comments on commit 26ea5fa

Please sign in to comment.