From a1a00757100662d102ed4c6f85a24a0490f4ad61 Mon Sep 17 00:00:00 2001 From: whoomee Date: Thu, 13 Aug 2026 14:31:18 +0200 Subject: [PATCH] meson: add disabledTests support --- doc/hooks/meson.section.md | 7 +++++++ doc/redirects.json | 3 +++ pkgs/by-name/me/meson/setup-hook.sh | 6 ++++++ 3 files changed, 16 insertions(+) diff --git a/doc/hooks/meson.section.md b/doc/hooks/meson.section.md index 86c751475c6d..750c32ad7036 100644 --- a/doc/hooks/meson.section.md +++ b/doc/hooks/meson.section.md @@ -92,3 +92,10 @@ Meson setup hook. - `prefixKey` - `enableParallelBuilding` - `enableParallelChecking` +- `disabledTests` + +#### `disabledTests` {#meson-disabled-tests} + +Specifies a list of tests to skip in `mesonCheckPhase`. +You can optionally specify a subproject using a colon prefix, e.g. `subproject:test_name`. +Meson will pick up the main project name as a default if no subproject is specified. diff --git a/doc/redirects.json b/doc/redirects.json index 64ac40004f0b..a48e5bcd6d1f 100644 --- a/doc/redirects.json +++ b/doc/redirects.json @@ -2981,6 +2981,9 @@ "meson-honored-variables": [ "index.html#meson-honored-variables" ], + "meson-disabled-tests": [ + "index.html#meson-disabled-tests" + ], "setup-hook-mpi-check": [ "index.html#setup-hook-mpi-check" ], diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh index 4eac58193142..6548008d6662 100644 --- a/pkgs/by-name/me/meson/setup-hook.sh +++ b/pkgs/by-name/me/meson/setup-hook.sh @@ -63,6 +63,12 @@ mesonCheckPhase() { flagsArray+=("--timeout-multiplier=0") fi + local _disabledTestsArray=() + concatTo _disabledTestsArray disabledTests + for disabledTest in "${_disabledTestsArray[@]}"; do + flagsArray+=("--exclude" "$disabledTest") + done + # Parallel building is enabled by default. local buildCores=1 if [ "${enableParallelBuilding-1}" ]; then