[glib-networking/wip/nacho/openssl: 5/11] Add a way to skip backends for tests
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/wip/nacho/openssl: 5/11] Add a way to skip backends for tests
- Date: Wed, 12 Sep 2018 11:54:35 +0000 (UTC)
commit 4c7dacb1c106e5db712cce4bf0dcd04f7c2bcfbc
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Mon Sep 10 15:34:23 2018 +0200
Add a way to skip backends for tests
tls/tests/meson.build | 82 ++++++++++++++++++++++++++-------------------------
1 file changed, 42 insertions(+), 40 deletions(-)
---
diff --git a/tls/tests/meson.build b/tls/tests/meson.build
index 60890c6..b980d4d 100644
--- a/tls/tests/meson.build
+++ b/tls/tests/meson.build
@@ -27,10 +27,10 @@ envs = [
]
test_programs = [
- ['certificate', [], deps],
- ['file-database', [], deps],
- ['connection', ['mock-interaction.c'], deps],
- ['dtls-connection', ['mock-interaction.c'], deps],
+ ['certificate', [], deps, []],
+ ['file-database', [], deps, []],
+ ['connection', ['mock-interaction.c'], deps, []],
+ ['dtls-connection', ['mock-interaction.c'], deps, ['openssl']],
]
if enable_pkcs11_support
@@ -49,44 +49,46 @@ endif
foreach backend: backends
foreach program: test_programs
- program_name = program[0] + '-' + backend
-
- test_conf = configuration_data()
- test_conf.set('installed_tests_dir', installed_tests_execdir)
- test_conf.set('program', program_name)
-
- if enable_installed_tests
- configure_file(
- input: test_template,
- output: program_name + '.test',
- install_dir: installed_tests_metadir,
- configuration: test_conf
+ if not program[3].contains(backend)
+ program_name = program[0] + '-' + backend
+
+ test_conf = configuration_data()
+ test_conf.set('installed_tests_dir', installed_tests_execdir)
+ test_conf.set('program', program_name)
+
+ if enable_installed_tests
+ configure_file(
+ input: test_template,
+ output: program_name + '.test',
+ install_dir: installed_tests_metadir,
+ configuration: test_conf
+ )
+ endif
+
+ test_cflags = cflags + [
+ '-DBACKEND="@0@"'.format(backend),
+ ]
+
+ exe = executable(
+ program_name,
+ [program[0] + '.c'] + program[1],
+ include_directories: incs,
+ dependencies: program[2],
+ c_args: test_cflags,
+ install: enable_installed_tests,
+ install_dir: installed_tests_execdir
)
- endif
- test_cflags = cflags + [
- '-DBACKEND="@0@"'.format(backend),
- ]
-
- exe = executable(
- program_name,
- [program[0] + '.c'] + program[1],
- include_directories: incs,
- dependencies: program[2],
- c_args: test_cflags,
- install: enable_installed_tests,
- install_dir: installed_tests_execdir
- )
-
- test_envs = envs + [
- 'GIO_MODULE_DIR=' + join_paths(meson.build_root(), 'tls', backend)
- ]
-
- test(
- program_name,
- exe,
- env: test_envs
- )
+ test_envs = envs + [
+ 'GIO_MODULE_DIR=' + join_paths(meson.build_root(), 'tls', backend)
+ ]
+
+ test(
+ program_name,
+ exe,
+ env: test_envs
+ )
+ endif
endforeach
endforeach
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]