98 lines
3.5 KiB
Diff
98 lines
3.5 KiB
Diff
|
|
From 2079e0ed79df6549a02310b1d8f183f983d2caa9 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Philip Chimento <philip.chimento@gmail.com>
|
||
|
|
Date: Sun, 19 Feb 2023 22:45:49 -0800
|
||
|
|
Subject: [PATCH] CI: Put testGtk4.js in 'dbus' suite
|
||
|
|
|
||
|
|
This is a temporary fix for GTK 4 trying to acquire a message bus on
|
||
|
|
startup, until we figure out what magic environment variable will
|
||
|
|
prevent that.
|
||
|
|
---
|
||
|
|
installed-tests/js/meson.build | 59 ++++++++++++++++++++--------------
|
||
|
|
1 file changed, 34 insertions(+), 25 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/installed-tests/js/meson.build b/installed-tests/js/meson.build
|
||
|
|
index f1bf57027..7e8f4acb4 100644
|
||
|
|
--- a/installed-tests/js/meson.build
|
||
|
|
+++ b/installed-tests/js/meson.build
|
||
|
|
@@ -154,10 +154,6 @@ if not get_option('skip_gtk_tests')
|
||
|
|
'GObjectDestructionAccess',
|
||
|
|
'LegacyGtk',
|
||
|
|
]
|
||
|
|
-
|
||
|
|
- if have_gtk4
|
||
|
|
- jasmine_tests += 'Gtk4'
|
||
|
|
- endif
|
||
|
|
endif
|
||
|
|
|
||
|
|
installed_js_tests_dir = installed_tests_execdir / 'js'
|
||
|
|
@@ -202,31 +198,40 @@ if get_option('installed_tests')
|
||
|
|
install_subdir('modules', install_dir: installed_js_tests_dir)
|
||
|
|
endif
|
||
|
|
|
||
|
|
-# testGDBus.js is separate, because it can be skipped, and during build should
|
||
|
|
-# be run using dbus-run-session
|
||
|
|
+# testGDBus.js and testGtk4.js are separate, because they can be skipped, and
|
||
|
|
+# during build should be run using dbus-run-session
|
||
|
|
|
||
|
|
-if not get_option('skip_dbus_tests')
|
||
|
|
- test_file = files('testGDBus.js')
|
||
|
|
- bus_config = files('../../test/test-bus.conf')
|
||
|
|
- test('GDBus', dbus_run_session,
|
||
|
|
- args: ['--config-file', bus_config, '--', minijasmine, test_file],
|
||
|
|
- env: tests_environment, protocol: 'tap', suite: 'dbus')
|
||
|
|
+dbus_tests = ['GDBus']
|
||
|
|
+if have_gtk4 and not get_option('skip_gtk_tests')
|
||
|
|
+ # FIXME: find out why GTK4 tries to acquire a message bus
|
||
|
|
+ dbus_tests += 'Gtk4'
|
||
|
|
endif
|
||
|
|
|
||
|
|
-gdbus_test_description_subst = {
|
||
|
|
- 'name': 'testGDBus.js',
|
||
|
|
- 'installed_tests_execdir': installed_tests_execdir,
|
||
|
|
-}
|
||
|
|
-gdbus_test_description = configure_file(
|
||
|
|
- configuration: gdbus_test_description_subst,
|
||
|
|
- input: '../minijasmine.test.in', output: 'testGDBus.test',
|
||
|
|
- install: get_option('installed_tests'),
|
||
|
|
- install_dir: installed_tests_metadir)
|
||
|
|
+bus_config = files('../../test/test-bus.conf')
|
||
|
|
+foreach test : dbus_tests
|
||
|
|
+ test_file = files('test@0@.js'.format(test))
|
||
|
|
|
||
|
|
-if get_option('installed_tests')
|
||
|
|
- install_data('matchers.js', 'testGDBus.js',
|
||
|
|
- install_dir: installed_js_tests_dir)
|
||
|
|
-endif
|
||
|
|
+ if not get_option('skip_dbus_tests')
|
||
|
|
+ test(test, dbus_run_session,
|
||
|
|
+ args: ['--config-file', bus_config, '--', minijasmine, test_file],
|
||
|
|
+ env: tests_environment, protocol: 'tap', suite: 'dbus')
|
||
|
|
+ endif
|
||
|
|
+
|
||
|
|
+ dbus_test_description_subst = {
|
||
|
|
+ 'name': 'test@0@.js'.format(test),
|
||
|
|
+ 'installed_tests_execdir': installed_tests_execdir,
|
||
|
|
+ }
|
||
|
|
+ dbus_test_description = configure_file(
|
||
|
|
+ configuration: dbus_test_description_subst,
|
||
|
|
+ input: '../minijasmine.test.in',
|
||
|
|
+ output: 'test@0@.test'.format(test),
|
||
|
|
+ install: get_option('installed_tests'),
|
||
|
|
+ install_dir: installed_tests_metadir)
|
||
|
|
+
|
||
|
|
+ if get_option('installed_tests')
|
||
|
|
+ install_data(test_file, install_dir: installed_js_tests_dir)
|
||
|
|
+ endif
|
||
|
|
+endforeach
|
||
|
|
|
||
|
|
# tests using ES modules are also separate because they need an extra
|
||
|
|
# minijasmine flag
|
||
|
|
@@ -265,3 +270,7 @@ foreach test : modules_tests
|
||
|
|
install_data(test_file, install_dir: installed_js_tests_dir)
|
||
|
|
endif
|
||
|
|
endforeach
|
||
|
|
+
|
||
|
|
+if get_option('installed_tests')
|
||
|
|
+ install_data('matchers.js', install_dir: installed_js_tests_dir)
|
||
|
|
+endif
|