--- meson.build.orig 2024-12-07 13:12:14.000000000 -0500 +++ meson.build 2024-12-07 13:18:42.000000000 -0500 @@ -595,6 +595,8 @@ ### Test environment ########################################################### +if get_option('installed_tests') + tests_environment = environment() gi_tests_builddir = meson.project_build_root() / 'subprojects' / 'gobject-introspection-tests' js_tests_builddir = meson.current_build_dir() / 'installed-tests' / 'js' @@ -648,9 +650,11 @@ ### Tests and test setups ###################################################### # External code should not error out even when building with -Werror -gi_tests = subproject('gobject-introspection-tests', - default_options: ['werror=false', 'cairo=true', - 'install_dir=@0@'.format(installed_tests_execdir)]) +if get_option('installed_tests') + gi_tests = subproject('gobject-introspection-tests', + default_options: ['werror=false', 'cairo=true', + 'install_dir=@0@'.format(installed_tests_execdir)]) +endif subdir('installed-tests') @@ -721,6 +725,8 @@ warning('Not using DBus, not all tests will be run.') endif +endif + ### Summarize options ########################################################## summary({ --- installed-tests/js/meson.build.orig 2024-12-07 13:15:39.000000000 -0500 +++ installed-tests/js/meson.build 2024-12-07 13:16:30.000000000 -0500 @@ -4,6 +4,8 @@ ### Jasmine tests ############################################################## +if get_option('installed_tests') + jsunit_resources_files = gnome.compile_resources('jsunit-resources', 'jsunit.gresources.xml', c_name: 'jsunit_resources') @@ -176,6 +178,8 @@ endif endforeach +endif + if get_option('installed_tests') install_data('matchers.js', install_dir: installed_js_tests_dir) endif