[libsoup] build: Add http2_tests build option to explicitly enable them
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup] build: Add http2_tests build option to explicitly enable them
- Date: Fri, 4 Jun 2021 15:17:28 +0000 (UTC)
commit 2dae529ab45b8693b1771ccca89b055eda76561b
Author: Patrick Griffis <pgriffis igalia com>
Date: Fri Jun 4 10:12:23 2021 -0500
build: Add http2_tests build option to explicitly enable them
meson.build | 19 ++++++++++++-------
meson_options.txt | 8 +++++++-
2 files changed, 19 insertions(+), 8 deletions(-)
---
diff --git a/meson.build b/meson.build
index 97704170..4952d513 100644
--- a/meson.build
+++ b/meson.build
@@ -292,17 +292,22 @@ else
endif
# Quart server used for HTTP/2 tests
-pymod = import('python')
quart_found = false
-python = pymod.find_installation('python3')
-if python.found()
- ret = run_command(python, '-c', 'import importlib\nassert(importlib.find_loader("quart"))')
- if ret.returncode() == 0
- quart_found = true
+if not get_option('http2_tests').disabled()
+ pymod = import('python')
+ python = pymod.find_installation('python3')
+ if python.found()
+ ret = run_command(python, '-c', 'import importlib\nassert(importlib.find_loader("quart"))')
+ if ret.returncode() == 0
+ quart_found = true
+ endif
+ endif
+ message('Python module quart found: @0@'.format(quart_found.to_string('YES', 'NO')))
+ if get_option('http2_tests').enabled() and not quart_found
+ error('quart is required for http2 tests')
endif
endif
-message('Python module quart found: @0@'.format(quart_found.to_string('YES', 'NO')))
gnutls_dep = dependency('gnutls', required : get_option('tests'))
diff --git a/meson_options.txt b/meson_options.txt
index 778e5d34..50d6a41f 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -81,4 +81,10 @@ option('fuzzing',
type: 'feature',
value: 'disabled',
description: 'enable fuzzing support'
-)
\ No newline at end of file
+)
+
+option('http2_tests',
+ type: 'feature',
+ value: 'auto',
+ description: 'enable HTTP/2 tests depending on quart'
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]