diff --git a/Put-testGtk4.js-in-dbus-suite.patch b/Put-testGtk4.js-in-dbus-suite.patch new file mode 100644 index 0000000000000000000000000000000000000000..af18d60e93aca16da817a41b8afd28bc84c70404 --- /dev/null +++ b/Put-testGtk4.js-in-dbus-suite.patch @@ -0,0 +1,97 @@ +From 2079e0ed79df6549a02310b1d8f183f983d2caa9 Mon Sep 17 00:00:00 2001 +From: Philip Chimento +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 diff --git a/gjs.spec b/gjs.spec index f90eef4c30628269cb16fd6acd9bb3808815b922..9a5f415efb0e8ea01116e20ebaf72137842b3224 100644 --- a/gjs.spec +++ b/gjs.spec @@ -4,12 +4,14 @@ Name: gjs Version: 1.75.1 -Release: 1 +Release: 2 Summary: using GNOME libraries from Javascript License: MIT and (MPLv1.1 or GPLv2+ or LGPLv2+) URL: https://wiki.gnome.org/Projects/Gjs Source0: https://download.gnome.org/sources/%{name}/1.75/%{name}-%{version}.tar.xz Patch0: disable_tests-error.patch +#https://github.com/GNOME/gjs/commit/2079e0ed +Patch1: Put-testGtk4.js-in-dbus-suite.patch BuildRequires: gcc-c++ BuildRequires: meson @@ -84,6 +86,9 @@ Development files for gjs. %{_datadir}/glib-2.0/schemas/org.gnome.GjsTest.gschema.xml %changelog +* Wed Feb 21 2024 liyanan - 1.75.1-2 +- Put testGtk4.js in dbus suite + * Mon Jan 2 2023 lin zhang - 1.75.1-1 - Upgrade to 1.75.1