diff options
author | Patrick Griffis <pgriffis@igalia.com> | 2021-06-04 10:12:23 -0500 |
---|---|---|
committer | Patrick Griffis <pgriffis@igalia.com> | 2021-06-04 10:15:12 -0500 |
commit | 2dae529ab45b8693b1771ccca89b055eda76561b (patch) | |
tree | 1bdef58875a47c4a33c48d23fb206838893b37c1 /meson.build | |
parent | 6cef69ae03732cad5d9aaf6eeedc49205153fa9c (diff) | |
download | libsoup-2dae529ab45b8693b1771ccca89b055eda76561b.tar.gz |
build: Add http2_tests build option to explicitly enable them
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 19 |
1 files changed, 12 insertions, 7 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')) |