package/bubblewrap: disable tests

Disable tests to avoid the following build failure on mips32:

[9/10] Compiling C object tests/try-syscall.p/try-syscall.c.o
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>
Acked-by: Adrian Perez de Castro <aperez@igalia.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
Fabrice Fontaine 2022-04-27 22:08:38 +02:00 committed by Arnout Vandecappelle (Essensium/Mind)
parent ea86757e51
commit ebf745b676
2 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,54 @@
From 34ea0ad841d6f9167db391c08e6cd51471fed6be Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Sun, 3 Apr 2022 11:27:06 +0200
Subject: [PATCH] meson: add tests option
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>
[Retrieved from:
https://github.com/containers/bubblewrap/commit/34ea0ad841d6f9167db391c08e6cd51471fed6be]
---
meson.build | 4 +++-
meson_options.txt | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 5b63aa64..9277ac4e 100644
--- a/meson.build
+++ b/meson.build
@@ -152,4 +152,6 @@ if not meson.is_subproject()
subdir('completions')
endif
-subdir('tests')
+if get_option('tests')
+ subdir('tests')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 2fa3a8c3..a136a3c3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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',

View File

@ -17,7 +17,8 @@ BUBBLEWRAP_CONF_OPTS = \
-Dzsh_completion=disabled \
-Dman=disabled \
-Dpython=$(HOST_DIR)/bin/python \
-Drequire_userns=false
-Drequire_userns=false \
-Dtests=false
ifeq ($(BR2_PACKAGE_BASH_COMPLETION),y)
BUBBLEWRAP_CONF_OPTS += \