From 292a521b74b514b04f299882a207349aea313794 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 15 Aug 2024 17:48:30 +1000 Subject: [PATCH] meson.build: switch the valgrind test logic around The current logic requires that --suite=valgrind is passed to a meson test run with --setup=valgrind. Since we don't want to valgrind the python tests (lest we have to valgrind python itself which is slow and error-prone) let's switch the logic around and use the slightly newer --exclude-suit to skip any pytest runs. --- .github/workflows/main.yml | 2 +- meson.build | 13 +++++++------ run-full-test.sh | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e175a1c7..8250c7323 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -87,7 +87,7 @@ jobs: - name: valgrind - meson test uses: ./.github/actions/meson with: - meson_test_args: --setup=valgrind --suite=valgrind + meson_test_args: --setup=valgrind env: CC: ${{matrix.compiler}} # Capture all the meson logs, even if we failed diff --git a/meson.build b/meson.build index 3ccfba012..7f4d4e165 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ project('libwacom', 'c', version: '2.12.2', license: 'HPND', default_options: [ 'c_std=gnu99', 'warning_level=2' ], - meson_version: '>= 0.56.0') + meson_version: '>= 0.57.0') dir_bin = get_option('prefix') / get_option('bindir') dir_data = get_option('prefix') / get_option('datadir') / 'libwacom' @@ -245,7 +245,7 @@ if get_option('tests').enabled() include_directories: [includes_include, includes_src], c_args: tests_cflags, install: false) - test('test-load', test_load, suite: ['all', 'valgrind']) + test('test-load', test_load, suite: ['all']) test_dbverify = executable('test-dbverify', 'test/test-dbverify.c', @@ -253,7 +253,7 @@ if get_option('tests').enabled() include_directories: [includes_src], c_args: tests_cflags, install: false) - test('test-dbverify', test_dbverify, suite: ['all', 'valgrind']) + test('test-dbverify', test_dbverify, suite: ['all']) test_tablet_validity = executable('test-tablet-validity', 'test/test-tablet-validity.c', @@ -261,7 +261,7 @@ if get_option('tests').enabled() include_directories: [includes_src], c_args: tests_cflags, install: false) - test('test-tablet-validity', test_tablet_validity, suite: ['all', 'valgrind']) + test('test-tablet-validity', test_tablet_validity, suite: ['all']) test_stylus_validity= executable('test-stylus-validity', 'test/test-stylus-validity.c', @@ -269,12 +269,13 @@ if get_option('tests').enabled() include_directories: [includes_src], c_args: tests_cflags, install: false) - test('test-stylus-validity', test_stylus_validity, suite: ['all', 'valgrind']) + test('test-stylus-validity', test_stylus_validity, suite: ['all']) valgrind = find_program('valgrind', required : false) if valgrind.found() valgrind_suppressions_file = dir_test / 'valgrind.suppressions' add_test_setup('valgrind', + exclude_suites: ['not-in-valgrind'], exe_wrapper: [valgrind, '--leak-check=full', '--gen-suppressions=all', @@ -310,7 +311,7 @@ if get_option('tests').enabled() ], env: env, timeout: 60, - suite: ['all']) + suite: ['all', 'not-in-valgrind']) endforeach endif endif diff --git a/run-full-test.sh b/run-full-test.sh index 28c97183c..7085c10eb 100755 --- a/run-full-test.sh +++ b/run-full-test.sh @@ -11,7 +11,7 @@ ninja -C $builddir test echo "####################################### running valgrind" pushd $builddir > /dev/null -meson test --setup=valgrind --suite=valgrind +meson test --setup=valgrind popd > /dev/null echo "####################################### running ubsan"