[libsoup/wip/http2: 4/4] tests: allow to run the http2 tests from the test executable




commit 32dc90696d2f15750bf57a791d1d1a2ff60185a1
Author: Carlos Garcia Campos <cgarcia igalia com>
Date:   Wed May 12 10:48:07 2021 +0200

    tests: allow to run the http2 tests from the test executable
    
    Use soup_test_build_filename_abs() to build the quart script path and
    add a configure_file rule for http2-server.py to menson.build so that
    it's copied to the build dir.

 tests/meson.build  | 4 ++++
 tests/test-utils.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/tests/meson.build b/tests/meson.build
index 6414efb6..8ff11ca1 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -68,6 +68,10 @@ tests = [
 ]
 
 if quart_found
+  configure_file(input : 'http2-server.py',
+    output : 'http2-server.py',
+    copy : true)
+
   tests += [
     ['http2', true, []],
   ]
diff --git a/tests/test-utils.c b/tests/test-utils.c
index 2c782ee0..00533b87 100644
--- a/tests/test-utils.c
+++ b/tests/test-utils.c
@@ -263,7 +263,7 @@ quart_init (void)
         g_subprocess_launcher_set_cwd (launcher, g_test_get_dir (G_TEST_DIST));
 
         GError *error = NULL;
-        char *script = g_test_build_filename (G_TEST_DIST, "http2-server.py", NULL);
+        char *script = soup_test_build_filename_abs (G_TEST_DIST, "http2-server.py", NULL);
         quart_proc = g_subprocess_launcher_spawn (launcher, &error, script, NULL);
         g_free (script);
         g_object_unref (launcher);


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