1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/cjs/hotfix-meson-no-tests.patch
3 # Copyright (C) 2024 The T2 SDE Project
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 --- cjs-6.2.0.tar.gz/meson.build.vanilla 2024-09-06 23:13:42.862404078 +0200
15 +++ cjs-6.2.0.tar.gz/meson.build 2024-09-06 23:18:27.264641062 +0200
17 gjs_console = executable('cjs-console', gjs_console_srcs,
18 dependencies: libgjs_dep, install: true)
20 -meson.add_install_script('build/symlink-gjs.py', get_option('bindir'))
22 -### Install data files #########################################################
24 -install_data('installed-tests/extra/gjs.supp',
25 - install_dir: get_option('datadir') / api_name / 'valgrind')
26 -install_data('installed-tests/extra/lsan.supp',
27 - install_dir: get_option('datadir') / api_name / 'lsan')
29 -if get_option('installed_tests')
30 - schemadir = abs_datadir / 'glib-2.0' / 'schemas'
31 - install_data('installed-tests/js/org.cinnamon.CjsTest.gschema.xml', install_dir: schemadir)
32 - meson.add_install_script('build/compile-gschemas.py', schemadir)
35 ### Generate pkg-config file ###################################################
37 pkg.generate(libgjs, name: api_name, description: 'JS bindings for GObjects',
39 ### Test environment ###########################################################
41 tests_environment = environment()
42 -js_tests_builddir = meson.current_build_dir() / 'installed-tests' / 'js'
43 -libgjs_test_tools_builddir = js_tests_builddir / 'libgjstesttools'
44 # GJS_PATH is empty here since we want to force the use of our own
45 # resources. G_FILENAME_ENCODING ensures filenames are not UTF-8
46 tests_environment.set('TOP_BUILDDIR', meson.build_root())
47 tests_environment.set('GJS_USE_UNINSTALLED_FILES', '1')
48 tests_environment.set('GJS_PATH', '')
49 tests_environment.set('GJS_DEBUG_OUTPUT', 'stderr')
50 -tests_environment.prepend('GI_TYPELIB_PATH', meson.current_build_dir(),
51 - js_tests_builddir, libgjs_test_tools_builddir)
52 -tests_environment.prepend('LD_LIBRARY_PATH', meson.current_build_dir(),
53 - js_tests_builddir, libgjs_test_tools_builddir)
54 -tests_environment.prepend('DYLD_FALLBACK_LIBRARY_PATH', meson.current_build_dir(),
55 - js_tests_builddir, libgjs_test_tools_builddir)
56 tests_environment.set('G_FILENAME_ENCODING', 'latin1')
57 # Workaround for https://github.com/google/sanitizers/issues/1322
58 tests_environment.set('ASAN_OPTIONS', 'intercept_tls_get_addr=0')
59 @@ -663,110 +640,16 @@
60 meson.current_source_dir() / 'installed-tests' / 'extra' / 'tsan.supp'))
61 tests_environment.set('G_SLICE', 'always-malloc')
62 tests_environment.set('NO_AT_BRIDGE', '1')
63 -tests_environment.set('GSETTINGS_SCHEMA_DIR', js_tests_builddir)
64 tests_environment.set('GSETTINGS_BACKEND', 'memory')
65 tests_environment.set('G_DEBUG', 'fatal-warnings,fatal-criticals')
68 -if cxx.get_argument_syntax() != 'msvc'
69 - result = run_command('build/choose-tests-locale.sh', check: false)
70 - if result.returncode() == 0
71 - tests_locale = result.stdout().strip()
72 - tests_environment.set('LC_ALL', tests_locale)
76 -if not get_option('skip_gtk_tests')
77 - tests_environment.set('ENABLE_GTK', 'yes')
80 if get_option('b_coverage')
81 tests_environment.set('GJS_UNIT_COVERAGE_OUTPUT', 'lcov')
82 tests_environment.set('GJS_UNIT_COVERAGE_PREFIX',
83 'resource:///org/gnome/gjs')
86 -### Tests and test setups ######################################################
88 -subdir('installed-tests')
90 -# Note: The test program in test/ needs to be ported
91 -# to Windows before we can build it on Windows.
92 -if host_machine.system() != 'windows'
96 -valgrind_environment = environment()
97 -valgrind_environment.set('G_SLICE', 'always-malloc,debug-blocks')
98 -valgrind_environment.set('G_DEBUG',
99 - 'fatal-warnings,fatal-criticals,gc-friendly')
100 -valgrind_environment.set('VALGRIND', 'valgrind')
102 -glib_prefix = glib.get_variable(pkgconfig: 'prefix', default_value: '/usr')
103 -glib_suppresssions = (glib_prefix / 'share' / 'glib-2.0' / 'valgrind' /
105 -gjs_suppressions = (meson.current_source_dir() / 'installed-tests' / 'extra' /
108 - '--suppressions=@0@'.format(glib_suppresssions),
109 - '--suppressions=@0@'.format(gjs_suppressions),
110 - '--leak-check=full',
111 - '--num-callers=15',
112 - '--trace-children=yes',
113 - '--trace-children-skip=*basename,*cat,*diff,*echo,*grep,*rm,*sed,*stat,*true',
114 - '--error-exitcode=1'
117 -add_test_setup('quiet', env: ['GJS_DEBUG_TOPICS='], is_default: true)
118 -add_test_setup('verbose')
120 -add_test_setup('valgrind', timeout_multiplier: 40, env: valgrind_environment,
121 - exe_wrapper: ['valgrind'] + valgrind_args)
123 -zeal2_environment = environment()
124 -zeal2_environment.set('JS_GC_ZEAL', '2,10')
125 -add_test_setup('extra_gc', timeout_multiplier: 40, env: zeal2_environment)
127 -zeal4_environment = environment()
128 -zeal4_environment.set('JS_GC_ZEAL', '4')
129 -add_test_setup('pre_verify', timeout_multiplier: 40, env: zeal4_environment)
131 -zeal11_environment = environment()
132 -zeal11_environment.set('JS_GC_ZEAL', '11')
133 -add_test_setup('post_verify', timeout_multiplier: 2, env: zeal11_environment)
135 -### Warn about conditions that may affect runtime ##############################
137 -if gi.version().version_compare('<1.71.0')
138 - warning('''You do not have a new enough version of
139 -gobject-introspection to run the tests. You can still build GJS, but some
140 -tests will fail.''')
143 -if tests_locale == 'C' or tests_locale == 'N/A'
144 - warning('''Your libc does not have the C.UTF-8 locale and no other
145 -suitable UTF-8 fallback locale could be found. You can still build GJS, but
146 -some tests will fail.''')
149 -if get_option('buildtype').startswith('debug') and nondebug_spidermonkey
150 - warning('''Your copy of SpiderMonkey is not debug-enabled, but you are
151 -building a debug or debugoptimized build. This will make development more
152 -difficult. Consider reconfiguring SpiderMonkey with --enable-debug.''')
156 - warning('Building without Cairo support, not all tests will be run.')
159 -if get_option('skip_gtk_tests')
160 - warning('Not using GTK, not all tests will be run.')
163 -if get_option('skip_dbus_tests')
164 - warning('Not using DBus, not all tests will be run.')
167 ### Summarize options ##########################################################
169 prefix = get_option('prefix')
173 'Build type': get_option('buildtype'),
174 - 'Installed tests': get_option('installed_tests'),
175 '-Bsymbolic-functions': get_option('bsymbolic_functions'),
176 'Skip DBus tests': get_option('skip_dbus_tests'),
177 'Skip GTK tests': get_option('skip_gtk_tests'),
179 'Dtrace debugging': get_option('dtrace'),
180 'Systemtap debugging': get_option('systemtap'),
181 }, section: 'Optional features', bool_yn: true)
183 -### Maintainer scripts #########################################################
185 -run_target('maintainer-upload-release',
186 - command: ['build/maintainer-upload-release.sh',
187 - meson.project_name(),
188 - meson.project_version()])
189 --- cjs-6.2.0.tar.gz/installed-tests/js/meson.build.vanilla 2024-09-06 23:23:27.129994864 +0200
190 +++ cjs-6.2.0.tar.gz/installed-tests/js/meson.build 2024-09-06 23:24:05.796298053 +0200
192 include_directories: gi_tests_include,
193 dependencies: regress_dependencies, install: get_option('installed_tests'),
194 install_dir: installed_tests_execdir)
195 -regress_gir = gnome.generate_gir(libregress, includes: regress_gir_includes,
196 - sources: regress_sources, namespace: 'Regress', nsversion: '1.0',
197 - identifier_prefix: 'Regress', symbol_prefix: 'regress_',
198 - extra_args: ['--warn-all', '--warn-error'] + regress_gir_c_args,
199 - install: get_option('installed_tests'), install_dir_gir: false,
200 - install_dir_typelib: installed_tests_execdir)
201 regress_typelib = regress_gir[1]
205 # This should have --warn-all turned off, but there is currently no way to
206 # do so in gnome.generate_gir().
207 # See https://github.com/mesonbuild/meson/issues/5876
208 - warnlib_gir = gnome.generate_gir(libwarnlib, includes: ['Gio-2.0'],
209 - sources: warnlib_sources, namespace: 'WarnLib', nsversion: '1.0',
210 - symbol_prefix: 'warnlib_', header: 'warnlib.h',
211 - install: get_option('installed_tests'), install_dir_gir: false,
212 - install_dir_typelib: installed_tests_execdir)
213 warnlib_typelib = warnlib_gir[1]
217 include_directories: gi_tests_include,
218 c_args: test_gir_extra_c_args + test_gir_warning_c_args,
219 install: get_option('installed_tests'), install_dir: installed_tests_execdir)
220 -gimarshallingtests_gir = gnome.generate_gir(libgimarshallingtests,
221 - includes: ['Gio-2.0'], sources: gimarshallingtests_sources,
222 - namespace: 'GIMarshallingTests', nsversion: '1.0',
223 - symbol_prefix: 'gi_marshalling_tests_', extra_args: '--warn-error',
224 - install: get_option('installed_tests'), install_dir_gir: false,
225 - install_dir_typelib: installed_tests_execdir)
226 gimarshallingtests_typelib = gimarshallingtests_gir[1]
228 subdir('libgjstesttools')
230 if not get_option('skip_gtk_tests')
231 have_gtk4 = dependency('gtk4', required: false).found()
235 # FIXME: find out why GTK4 tries to acquire a message bus
238 --- cjs-6.2.0.tar.gz/meson.build.vanilla 2024-09-06 23:27:47.176032627 +0200
239 +++ cjs-6.2.0.tar.gz/meson.build 2024-09-06 23:28:08.299198022 +0200
241 libgjs_dep = declare_dependency(link_with: [libgjs, libgjs_jsapi],
242 dependencies: base_build_dep, include_directories: top_include)
244 -### Build CjsPrivate introspection library #####################################
246 -gjs_private_gir = gnome.generate_gir(libgjs,
247 - includes: ['GObject-2.0', 'Gio-2.0'], sources: libgjs_private_sources,
248 - namespace: 'CjsPrivate', nsversion: '1.0', identifier_prefix: 'Gjs',
249 - symbol_prefix: 'gjs_', extra_args: '--warn-error', install: true,
250 - install_dir_gir: false, install_dir_typelib: pkglibdir / 'girepository-1.0')
251 -gjs_private_typelib = gjs_private_gir[1]
253 ### Build cjs-console interpreter ##############################################
255 gjs_console_srcs = ['cjs/console.cpp']