[libsoup/wip/meson: 32/38] Fix unit tests that don't need apache to run
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsoup/wip/meson: 32/38] Fix unit tests that don't need apache to run
- Date: Thu, 16 Nov 2017 15:17:05 +0000 (UTC)
commit 5d40ae85e8e6e94234c00324f29b0538453c62d3
Author: Tomas Popela <tpopela redhat com>
Date: Mon Nov 13 12:27:36 2017 +0100
Fix unit tests that don't need apache to run
tests/meson.build | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 3114143..333b39a 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -43,10 +43,20 @@ tests = [
'xmlrpc'
]
+env = environment()
+env.set('G_TEST_SRCDIR', meson.current_source_dir())
+env.set('G_TEST_BUILDDIR', meson.current_build_dir())
+env.set('G_DEBUG', 'gc-friendly')
+env.set('MALLOC_CHECK_', '2')
+# This is set by Meson if empty
+env.set('MALLOC_PERTURB_', '')
+
foreach test: tests
- auth_test = executable('@0@-test'.format(test), '@0@-test.c'.format(test),
- link_with: test_utils,
- dependencies : [glib_dep, libsoup_dep])
+ test_name = '@0@-test'.format(test)
+ test_target = executable(test_name, test_name + '.c',
+ link_with: test_utils,
+ dependencies : [glib_dep, libsoup_dep])
+ test(test_name, test_target, env : env)
endforeach
executable('ntlm-test-helper', 'ntlm-test-helper.c',
@@ -56,6 +66,15 @@ configure_file(output : 'httpd.conf',
input : 'httpd.conf.in',
configuration : cdata)
+# There is not copy_file() in Meson and this is official workaroud as per
+# https://github.com/mesonbuild/meson/issues/860
+configure_file(input : 'test-cert.pem',
+ output : 'test-cert.pem',
+ configuration : configuration_data())
+configure_file(input : 'test-key.pem',
+ output : 'test-key.pem',
+ configuration : configuration_data())
+
gnome.compile_resources('soup-tests',
'soup-tests.gresource.xml',
gresource_bundle : true,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]