Skip to content

Commit

Permalink
meson: add tests option
Browse files Browse the repository at this point in the history
Allow the user to disable tests, for example to avoid the following
build failure on mips32:

FAILED: tests/try-syscall.p/try-syscall.c.o
/home/autobuild/autobuild/instance-11/output-1/host/bin/mipsel-buildroot-linux-musl-gcc -Itests/try-syscall.p -Itests -I../tests -fdiagnostics-color=always -Wall -Winvalid-pch -Wextra -O3 -D_GNU_SOURCE -Werror=shadow -Werror=empty-body -Werror=strict-prototypes -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=missing-declarations -Werror=return-type -Werror=overflow -Werror=int-conversion -Werror=incompatible-pointer-types -Werror=misleading-indentation -Werror=missing-include-dirs -Werror=aggregate-return -Werror=switch-default -Wswitch-enum -Wno-sign-compare -Wno-error=sign-compare -Wno-missing-field-initializers -Wno-error=missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O1 -g0 -MD -MQ tests/try-syscall.p/try-syscall.c.o -MF tests/try-syscall.p/try-syscall.c.o.d -o tests/try-syscall.p/try-syscall.c.o -c ../tests/try-syscall.c
../tests/try-syscall.c:34:5: error: #error "Unknown MIPS ABI"
   34 | #   error "Unknown MIPS ABI"
      |     ^~~~~

Fixes:
 - http://autobuild.buildroot.org/results/cf0365354fc8c16e5871d561daae0fa5039d0bee

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine committed Apr 6, 2022
1 parent 34a8c8b commit 34ea0ad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion meson.build
Expand Up @@ -152,4 +152,6 @@ if not meson.is_subproject()
subdir('completions')
endif

subdir('tests')
if get_option('tests')
subdir('tests')
endif
6 changes: 6 additions & 0 deletions meson_options.txt
Expand Up @@ -38,6 +38,12 @@ option(
description : 'enable optional SELINUX support',
value : 'auto',
)
option(
'tests',
type : 'boolean',
description : 'build tests',
value : 'true',
)
option(
'zsh_completion',
type : 'feature',
Expand Down

0 comments on commit 34ea0ad

Please sign in to comment.