summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2017-11-13 12:27:36 +0100
committerTomas Popela <tpopela@redhat.com>2018-04-11 12:39:19 +0200
commit2437bdfdd6b0d7275d42b3c23c02e5bf2a8dff67 (patch)
tree539bd919924103d3a87aabb5bb390d9e9d848cf8 /tests
parent3cbe543b86716d29422265fe7ce4e59a3035869f (diff)
downloadlibsoup-2437bdfdd6b0d7275d42b3c23c02e5bf2a8dff67.tar.gz
Fix unit tests that don't need apache to run
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build25
1 files changed, 22 insertions, 3 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 3114143c..333b39ab 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,