[libsoup/carlosgc/preconnect: 1/2] tests: ensure we use an absolute path for apache server root parameter




commit 8d3bb0870022956b9ce59c327fd05cf2473950b5
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Mon Sep 7 13:47:15 2020 +0200

    tests: ensure we use an absolute path for apache server root parameter
    
    For some reason apache silently fails now if a relative path is passed.

 tests/test-utils.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/tests/test-utils.c b/tests/test-utils.c
index 0c48e506..a83db261 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -158,6 +158,13 @@ apache_cmd (const char *cmd)
        gboolean ok;
 
        server_root = g_test_build_filename (G_TEST_BUILT, "", NULL);
+       if (!g_path_is_absolute (server_root)) {
+               char *abs_server_root;
+
+               abs_server_root = g_canonicalize_filename (server_root, NULL);
+               g_free (server_root);
+               server_root = abs_server_root;
+       }
 
        cwd = g_get_current_dir ();
 #ifdef HAVE_APACHE_2_4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]