diff options
author | Carlos Garcia Campos <cgarcia@igalia.com> | 2019-06-17 15:09:06 +0200 |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2019-06-17 15:32:10 +0200 |
commit | 868910f5ff4e7e96653b48b9076e290ee8df44e8 (patch) | |
tree | 743a74648a46fe2e7c0bd248d5f1f3e6842b81eb /tests | |
parent | 4aa232cb7603d9bfd1296208cdeec67394816730 (diff) | |
download | libsoup-868910f5ff4e7e96653b48b9076e290ee8df44e8.tar.gz |
test-utils: ensure we always provide an absolute path to g_tls_file_database_new
This made tests fail when run from build dir due to runtime critical
GLib-Net-WARNING **: 12:41:13.877: The anchor file name used with a GTlsFileDatabase must be an absolute path, and not relative: tests/test-cert.pem
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-utils.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-utils.c b/tests/test-utils.c index 7a21fa02..bd1bab05 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -239,9 +239,13 @@ soup_test_session_new (GType type, ...) va_end (args); if (tls_available) { + char *abs_cafile; + cafile = g_test_build_filename (G_TEST_DIST, "test-cert.pem", NULL); - tlsdb = g_tls_file_database_new (cafile, &error); + abs_cafile = g_canonicalize_filename (cafile, NULL); g_free (cafile); + tlsdb = g_tls_file_database_new (abs_cafile, &error); + g_free (abs_cafile); if (error) { if (g_strcmp0 (g_getenv ("GIO_USE_TLS"), "dummy") == 0) g_clear_error (&error); |