mirror of
https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
synced 2024-11-23 10:53:40 +08:00
Move sanitizer details into a test wrapper
We want the meson test target to be self contained and having an essential variables defined in the GitHub CI is heading the opposite direction. Create a wrapper that does this for us. v2: - add the script to the autotools tarball/EXTRA_DIST Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Link: https://github.com/kmod-project/kmod/pull/179 Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
This commit is contained in:
parent
01a48d2cdf
commit
5798e18844
1
.github/workflows/main.yml
vendored
1
.github/workflows/main.yml
vendored
@ -70,7 +70,6 @@ jobs:
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
.github/print-kdir.sh >> "$GITHUB_ENV"
|
||||
echo "ASAN_OPTIONS=verify_asan_link_order=0:halt_on_error=1:abort_on_error=1:print_summary=1" >> "$GITHUB_ENV"
|
||||
|
||||
- name: configure (meson)
|
||||
if: ${{ matrix.build == 'meson' }}
|
||||
|
@ -24,6 +24,7 @@ EXTRA_DIST += \
|
||||
testsuite/meson.build \
|
||||
scripts/build-scdoc.sh \
|
||||
scripts/test-gtkdoc.sh \
|
||||
scripts/test-wrapper.sh \
|
||||
scripts/kmod-symlink.sh
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
|
@ -459,6 +459,7 @@ if get_option('build-tests')
|
||||
setup_modules = find_program('scripts/setup-modules.sh')
|
||||
setup_rootfs = find_program('scripts/setup-rootfs.sh')
|
||||
top_include = include_directories('.')
|
||||
test_wrapper = find_program('scripts/test-wrapper.sh')
|
||||
subdir('testsuite')
|
||||
endif
|
||||
|
||||
|
10
scripts/test-wrapper.sh
Executable file
10
scripts/test-wrapper.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [[ ${ASAN_OPTIONS-} || ${UBSAN_OPTIONS-} || ${MSAN_OPTIONS-} ]]; then
|
||||
ASAN_OPTIONS=verify_asan_link_order=0:halt_on_error=1:abort_on_error=1:print_summary=1
|
||||
export ASAN_OPTIONS
|
||||
fi
|
||||
|
||||
exec "$@"
|
@ -97,7 +97,8 @@ _testsuite = [
|
||||
foreach input : _testsuite
|
||||
test(
|
||||
input,
|
||||
executable(
|
||||
test_wrapper,
|
||||
args : executable(
|
||||
input,
|
||||
files('@0@.c'.format(input)),
|
||||
include_directories : top_include,
|
||||
|
Loading…
Reference in New Issue
Block a user