From 62dca6c1cfd441119cd7bf28a950777d846b5e3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 19 Oct 2022 20:08:15 +0200 Subject: [PATCH 01/14] meson, ci: Support tests that can fail under certain conditions We have tests that are failing in some environments, but it's difficult to handle them because: - for some environments we just allow all the tests to fail: DANGEROUS - when we don't allow failures we have flacky tests: A CI pain So, to avoid this and ensure that: - New failing tests are tracked in all platforms - gitlab integration on tests reports is working - coverage is reported also for failing tests Add support for `can_fail` keyword on tests that would mark the test as part of the `failing` test suite. Not adding the suite directly when defining the tests as this is definitely simpler and allows to define conditions more clearly (see next commits). Now, add a default test setup that does not run the failing and flaky tests by default (not to bother distributors with testing well-known issues) and eventually run all the tests in CI: - Non-flaky tests cannot fail in all platforms - Failing and Flaky tests can fail In both cases we save the test reports so that gitlab integration is preserved. --- .gitlab-ci.yml | 40 ++++++++++++++++++++------- .gitlab-ci/run-tests.sh | 7 ++++- .gitlab-ci/test-msvc.bat | 3 +- .gitlab-ci/test-msys2.sh | 4 ++- gio/tests/meson.build | 20 ++++++++++---- glib/tests/meson.build | 21 ++++++++++---- gmodule/tests/meson.build | 5 ++++ gobject/tests/meson.build | 24 +++++++++++----- gobject/tests/performance/meson.build | 4 +++ meson.build | 14 +++++++++- 10 files changed, 111 insertions(+), 31 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9aa2d484..4ec76b9f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,7 +99,9 @@ fedora-x86_64: - lcov --config-file .lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov" artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -140,7 +142,9 @@ debian-stable-x86_64: - .gitlab-ci/run-tests.sh artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -206,7 +210,9 @@ G_DISABLE_ASSERT: - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -281,7 +287,9 @@ cross-mingw64: - ninja -C _build artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -308,7 +316,9 @@ msys2-mingw32: - C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh" artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -331,7 +341,9 @@ vs2017-x64: --python.purelibdir=C:\Python37\site-packages artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -359,7 +371,9 @@ vs2017-x64-static: --python.purelibdir=C:\Python37\site-packages artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${env:CI_JOB_NAME}-${env:CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -401,7 +415,9 @@ freebsd-12-x86_64: - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -428,7 +444,9 @@ freebsd-13-x86_64: - bash -x ./.gitlab-ci/run-tests.sh artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week @@ -468,7 +486,9 @@ macos: - .gitlab-ci/run-tests.sh artifacts: reports: - junit: "_build/meson-logs/testlog.junit.xml" + junit: + - _build/meson-logs/testlog.junit.xml + - _build/meson-logs/testlog-*.junit.xml name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}" when: always expire_in: 1 week diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index d742a34ca..b9d5b0c69 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -7,5 +7,10 @@ set -e meson test \ -C _build \ --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ - --no-suite flaky \ "$@" + +# Run only the flaky tests, so we can log the failures but without hard failing +meson test \ + -C _build \ + --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ + "$@" --setup=unstable_tests --suite=failing --suite=flaky || true diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index 82e445e00..524b6be30 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -18,7 +18,8 @@ python .gitlab-ci/check-missing-install-tag.py _build || goto :error ninja -C _build || goto :error :: FIXME: dont ignore test errors -meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --no-suite flaky +meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% +meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky :: FIXME: can we get code coverage support? diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index a345fda6a..43708636a 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -51,7 +51,9 @@ lcov \ --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" # FIXME: fix the test suite -meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky || true +meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" || true +meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ + --setup=unstable_tests --suite=failing --suite=flaky || true lcov \ --quiet \ diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 5e8b6ad19..4641c782c 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -149,9 +149,9 @@ test_extra_programs = { 'gsubprocess-testprog' : {}, } -python_tests = [ - 'codegen.py', -] +python_tests = { + 'codegen.py' : {}, +} test_env = environment(common_test_env) test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) @@ -907,6 +907,10 @@ foreach test_name, extra_args : gio_tests local_test_env.append(var, value) endforeach + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test(test_name, exe, env : local_test_env, timeout : timeout, @@ -930,13 +934,19 @@ foreach program_name, extra_args : test_extra_programs ) endforeach -foreach test_name : python_tests +foreach test_name, extra_args : python_tests + suite = ['gio', 'no-valgrind'] + + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test( test_name, python, args: ['-B', files(test_name)], env: test_env, - suite: ['gio', 'no-valgrind'], + suite: suite, ) if installed_tests_enabled diff --git a/glib/tests/meson.build b/glib/tests/meson.build index a9d8c4951..82f28dd52 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -297,6 +297,11 @@ foreach test_name, extra_args : glib_tests suite = ['glib'] + extra_args.get('suite', []) timeout = suite.contains('slow') ? test_timeout_slow : test_timeout + + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test(test_name, exe, env : test_env, timeout : timeout, @@ -313,9 +318,9 @@ if installed_tests_enabled ) endif -python_tests = [ - 'assert-msg-test.py', -] +python_tests = { + 'assert-msg-test.py' : {}, +} executable('assert-msg-test', ['assert-msg-test.c'], c_args : test_cargs, @@ -326,13 +331,19 @@ executable('assert-msg-test', ['assert-msg-test.c'], win_subsystem : extra_args.get('win_subsystem', 'console'), ) -foreach test_name : python_tests +foreach test_name, extra_args : python_tests + suite = ['glib', 'no-valgrind'] + + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test( test_name, python, args: ['-B', files(test_name)], env: test_env, - suite: ['glib', 'no-valgrind'], + suite: suite, ) if installed_tests_enabled diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index 9e4f5a39d..29b76b1b8 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -96,5 +96,10 @@ foreach test_name, extra_args : gmodule_tests suite = ['gmodule'] + extra_args.get('suite', []) timeout = suite.contains('slow') ? test_timeout_slow : test_timeout + + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test(test_name, exe, env : test_env, timeout : timeout, suite : suite) endforeach diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build index 8475b3aa2..0945558da 100644 --- a/gobject/tests/meson.build +++ b/gobject/tests/meson.build @@ -123,11 +123,11 @@ if cc.get_id() != 'msvc' gobject_tests += {'autoptr' : {}} endif -python_tests = [ - 'genmarshal.py', - 'gobject-query.py', - 'mkenums.py', -] +python_tests = { + 'genmarshal.py' : {}, + 'gobject-query.py' : {}, + 'mkenums.py' : {}, +} test_env = environment(common_test_env) test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) @@ -167,6 +167,10 @@ foreach test_name, extra_args : gobject_tests suite = ['gobject'] + extra_args.get('suite', []) timeout = suite.contains('slow') ? test_timeout_slow : test_timeout + if extra_args.get('can_fail', false) + suite += 'failing' + endif + # FIXME: https://gitlab.gnome.org/GNOME/glib/issues/1316 # aka https://bugs.debian.org/880883 if test_name == 'closure-refcount' and ['arm', 'aarch64'].contains(host_machine.cpu_family()) @@ -176,13 +180,19 @@ foreach test_name, extra_args : gobject_tests test(test_name, exe, env : test_env, timeout : timeout, suite : suite) endforeach -foreach test_name : python_tests +foreach test_name, extra_args : python_tests + suite = ['gobject', 'no-valgrind'] + + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test( test_name, python, args: ['-B', files(test_name)], env: test_env, - suite: ['gobject', 'no-valgrind'], + suite: suite, ) if installed_tests_enabled diff --git a/gobject/tests/performance/meson.build b/gobject/tests/performance/meson.build index 01b6af534..f3a37ef4d 100644 --- a/gobject/tests/performance/meson.build +++ b/gobject/tests/performance/meson.build @@ -40,6 +40,10 @@ foreach test_name, extra_args : gobject_tests timeout = suite.contains('slow') ? test_timeout_slow : test_timeout args = extra_args.get('args', []) + if extra_args.get('can_fail', false) + suite += 'failing' + endif + test(test_name, exe, env : test_env, timeout : timeout, diff --git a/meson.build b/meson.build index c49815a9c..bc2aa19c9 100644 --- a/meson.build +++ b/meson.build @@ -129,13 +129,24 @@ installed_tests_template_tap = files('tests/template-tap.test.in') # Don’t build the tests unless we can run them (either natively, in an exe wrapper, or by installing them for later use) build_tests = get_option('tests') and (meson.can_run_host_binaries() or installed_tests_enabled) +add_test_setup('default', + is_default: true, + exclude_suites: ['flaky', 'failing'], +) + +add_test_setup('unstable_tests', + # Empty test setup, used for having different results set for flaky tests + # Sadly we can't use (https://github.com/mesonbuild/meson/issues/10934): + #suites: ['flaky', 'unstable'] +) + # Allow the tests to be easily run under valgrind using --setup=valgrind valgrind = find_program('valgrind', required: false) if valgrind.found() suppression_file = files('tools' / 'glib.supp') add_test_setup('valgrind', - exclude_suites: [ 'no-valgrind' ], + exclude_suites: [ 'no-valgrind', 'flaky' ], exe_wrapper: [ valgrind, '--tool=memcheck', @@ -2310,6 +2321,7 @@ common_test_env = [ 'G_ENABLE_DIAGNOSTIC=1', 'MALLOC_CHECK_=2', ] + test_timeout = 60 test_timeout_slow = 180 From 914bb06ab43f38e9edc6df2bd95fe26f39bdf7e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 19 Oct 2022 21:33:19 +0200 Subject: [PATCH 02/14] gio: mark codegen test as can-fail in freebsd See: https://gitlab.gnome.org/GNOME/glib/-/issues/2764 --- gio/tests/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 4641c782c..c894f12e0 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -150,7 +150,8 @@ test_extra_programs = { } python_tests = { - 'codegen.py' : {}, + # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/2764 + 'codegen.py' : { 'can_fail' : host_system == 'freebsd' }, } test_env = environment(common_test_env) From b9e085537d8c72373bd40d31edd592bfe9d172aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 00:51:34 +0200 Subject: [PATCH 03/14] meson: Expose library build type as global variables Given that it can be computed using an error-prone strings comparisons it is better to provide a variable everywhere, so that we don't have the risk of comparing values that are always false. --- docs/reference/meson.build | 10 +++++----- gio/meson.build | 2 +- .../gdbus-object-manager-example/meson.build | 2 +- gio/tests/meson.build | 6 +++--- glib/meson.build | 2 +- glib/tests/meson.build | 2 +- gmodule/tests/meson.build | 2 +- gobject/meson.build | 2 +- meson.build | 20 +++++++++++++++++-- 9 files changed, 32 insertions(+), 16 deletions(-) diff --git a/docs/reference/meson.build b/docs/reference/meson.build index fb4b26bc9..c417ffecb 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -45,12 +45,12 @@ if get_option('gtk_doc') dependency('gtk-doc', version : '>=1.32.1', fallback : ['gtk-doc', 'dummy_dep'], default_options : ['tests=false']) -endif -# We cannot built the API reference off of a static library, -# as symbols might get dropped by the linker -if get_option('gtk_doc') and get_option('default_library') == 'static' - error('The API reference can only be built against a shared library') + # We cannot built the API reference off of a static library, + # as symbols might get dropped by the linker + if not glib_build_shared + error('The API reference can only be built against a shared library') + endif endif subdir('gio') diff --git a/gio/meson.build b/gio/meson.build index d16fc5230..a51926fcf 100644 --- a/gio/meson.build +++ b/gio/meson.build @@ -601,7 +601,7 @@ gio_sources = files( 'gliststore.c', ) -if get_option('default_library') != 'static' +if glib_build_shared gio_sources += files ('../glib/gtrace.c') endif diff --git a/gio/tests/gdbus-object-manager-example/meson.build b/gio/tests/gdbus-object-manager-example/meson.build index c26238f5f..ac5e6d4df 100644 --- a/gio/tests/gdbus-object-manager-example/meson.build +++ b/gio/tests/gdbus-object-manager-example/meson.build @@ -39,7 +39,7 @@ gdbus_example_objectmanager_rst_gen = custom_target('objectmanager-rst-gen', ) extra_c_args = [] -if get_option('default_library') == 'static' +if glib_build_static_only extra_c_args = '-DGDBUS_OBJECT_MANAGER_EXAMPLE_STATIC_COMPILATION' endif diff --git a/gio/tests/meson.build b/gio/tests/meson.build index c894f12e0..f000907d8 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -223,7 +223,7 @@ if host_machine.system() != 'windows' } # LD_PRELOAD modules don't work so well with AddressSanitizer - if have_rtld_next and get_option('default_library') != 'static' and get_option('b_sanitize') == 'none' + if have_rtld_next and glib_build_shared and get_option('b_sanitize') == 'none' gio_tests += { 'gsocketclient-slow' : { 'depends' : [ @@ -652,7 +652,7 @@ if meson.can_run_host_binaries() compiler_type = '--compiler=@0@'.format(cc.get_id()) - if get_option('default_library') != 'static' + if glib_build_shared plugin_resources_c = custom_target('plugin-resources.c', input : 'test4.gresource.xml', output : 'plugin-resources.c', @@ -983,6 +983,6 @@ endif subdir('services') -if get_option('default_library') != 'static' +if glib_build_shared subdir('modules') endif diff --git a/glib/meson.build b/glib/meson.build index ad1a61aff..4130b1ba6 100644 --- a/glib/meson.build +++ b/glib/meson.build @@ -348,7 +348,7 @@ glib_sources += files( platform_deps = [] if host_system == 'windows' - if get_option('default_library') == 'shared' + if glib_build_shared glib_win_rc = configure_file( input: 'glib.rc.in', output: 'glib.rc', diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 82f28dd52..270269596 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -205,7 +205,7 @@ else 'include' : {}, 'unix' : {}, } - if have_rtld_next and get_option('default_library') != 'static' + if have_rtld_next and glib_build_shared glib_tests += { 'gutils-user-database' : { 'depends' : [ diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index 29b76b1b8..004df2bf3 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -38,7 +38,7 @@ if ['darwin', 'ios'].contains(host_machine.system()) module_suffix = 'so' endif -if get_option('default_library') != 'static' +if glib_build_shared foreach module : ['moduletestplugin_a', 'moduletestplugin_b'] shared_module(module + '_plugin', 'lib@0@.c'.format(module), dependencies : [libglib_dep, libgmodule_dep], diff --git a/gobject/meson.build b/gobject/meson.build index 0dd955f66..565f22875 100644 --- a/gobject/meson.build +++ b/gobject/meson.build @@ -62,7 +62,7 @@ gobject_sources += files( 'gvaluetypes.c', ) -if host_system == 'windows' and get_option('default_library') == 'shared' +if host_system == 'windows' and glib_build_shared gobject_win_rc = configure_file( input: 'gobject.rc.in', output: 'gobject.rc', diff --git a/meson.build b/meson.build index bc2aa19c9..e395d8c65 100644 --- a/meson.build +++ b/meson.build @@ -221,11 +221,27 @@ if host_system == 'windows' and cc.get_id() != 'msvc' and cc.get_id() != 'clang- glib_conf.set('_FILE_OFFSET_BITS', 64) endif -if get_option('default_library') == 'both' and (host_system == 'windows' or host_system == 'cygwin') +glib_build_shared = false +glib_build_static = false +if get_option('default_library') == 'both' + glib_build_static = true + glib_build_shared = true +elif get_option('default_library') == 'static' + glib_build_static = true +elif get_option('default_library') == 'shared' + glib_build_shared = true +endif + +glib_build_both = glib_build_static and glib_build_shared +glib_build_static_only = glib_build_static and not glib_build_shared +glib_build_shared_only = glib_build_shared and not glib_build_static + +if glib_build_shared and glib_build_static and ( + host_system == 'windows' or host_system == 'cygwin') error('On Windows default_library must be "shared" or "static" but not "both"') endif -if get_option('default_library') == 'static' +if glib_build_static_only glibconfig_conf.set('GLIB_STATIC_COMPILATION', '1') glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1') glibconfig_conf.set('GIO_STATIC_COMPILATION', '1') From 54a9e797fea796cd8597d4bd0de6f3c82d080640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 19 Oct 2022 21:34:48 +0200 Subject: [PATCH 04/14] ci: Mark failing windows tests as can-fail and do not ignore test failures --- .gitlab-ci/test-msvc.bat | 3 +-- gio/tests/meson.build | 5 ++++- glib/tests/meson.build | 9 +++++++-- gmodule/tests/meson.build | 2 ++ gobject/tests/meson.build | 4 +++- 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index 524b6be30..c5d64fa36 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -17,8 +17,7 @@ meson %args% _build || goto :error python .gitlab-ci/check-missing-install-tag.py _build || goto :error ninja -C _build || goto :error -:: FIXME: dont ignore test errors -meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% +meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% || goto :error meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky :: FIXME: can we get code coverage support? diff --git a/gio/tests/meson.build b/gio/tests/meson.build index f000907d8..f6d6a020a 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -69,7 +69,9 @@ gio_tests = { 'giomodule' : {}, 'gsubprocess' : {}, 'g-file' : {}, - 'g-file-info' : {}, + 'g-file-info' : { + 'can_fail' : host_system == 'windows', + }, 'g-icon' : {}, 'gdbus-addresses' : {}, 'gdbus-message' : {}, @@ -78,6 +80,7 @@ gio_tests = { 'install_rpath' : installed_tests_execdir, # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'windows', }, 'inet-address' : {}, 'io-stream' : {}, diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 270269596..42abc9860 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -29,6 +29,7 @@ glib_tests = { 'fileutils' : {}, 'gdatetime' : { 'suite' : ['slow'], + 'can_fail' : host_system == 'windows', }, 'guuid' : {}, 'gvariant' : { @@ -111,7 +112,9 @@ glib_tests = { 'slice-eager-freeing' : {}, 'slist' : {}, 'sort' : {}, - 'spawn-multithreaded' : {}, + 'spawn-multithreaded' : { + 'can_fail': glib_build_static and host_system == 'windows', + }, 'spawn-path-search' : {}, 'spawn-singlethread' : { 'dependencies' : [winsock2], @@ -319,7 +322,9 @@ if installed_tests_enabled endif python_tests = { - 'assert-msg-test.py' : {}, + 'assert-msg-test.py' : { + 'can_fail' : host_system == 'windows', + }, } executable('assert-msg-test', ['assert-msg-test.c'], diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index 004df2bf3..e46321796 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -4,11 +4,13 @@ gmodule_tests = { 'export_dynamic' : true, 'source': 'module-test.c', 'c_args': ['-DMODULE_TYPE="library"'], + 'can_fail': glib_build_static and host_system == 'windows', }, 'module-test-plugin' : { 'export_dynamic' : true, 'source': 'module-test.c', 'c_args': ['-DMODULE_TYPE="plugin"'], + 'can_fail': glib_build_static and host_system == 'windows', }, } diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build index 0945558da..e476da5c7 100644 --- a/gobject/tests/meson.build +++ b/gobject/tests/meson.build @@ -125,7 +125,9 @@ endif python_tests = { 'genmarshal.py' : {}, - 'gobject-query.py' : {}, + 'gobject-query.py' : { + 'can_fail' : host_system == 'windows', + }, 'mkenums.py' : {}, } From 8d5ae3ae83091363e459c1de31fe8426734ff8ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 19 Oct 2022 21:34:48 +0200 Subject: [PATCH 05/14] ci: Mark failing mingw tests as can-fail and do not ignore test failures --- .gitlab-ci/test-msys2.sh | 3 +-- gio/tests/meson.build | 2 +- glib/tests/meson.build | 4 +++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 43708636a..5f9dcbd91 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -50,8 +50,7 @@ lcov \ --initial \ --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov" -# FIXME: fix the test suite -meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" || true +meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" meson test --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \ --setup=unstable_tests --suite=failing --suite=flaky || true diff --git a/gio/tests/meson.build b/gio/tests/meson.build index f6d6a020a..da56da886 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -70,7 +70,7 @@ gio_tests = { 'gsubprocess' : {}, 'g-file' : {}, 'g-file-info' : { - 'can_fail' : host_system == 'windows', + 'can_fail' : host_system == 'windows' and cc.get_id() != 'gcc', }, 'g-icon' : {}, 'gdbus-addresses' : {}, diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 42abc9860..db4684348 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -119,7 +119,9 @@ glib_tests = { 'spawn-singlethread' : { 'dependencies' : [winsock2], }, - 'spawn-test' : {}, + 'spawn-test' : { + 'can_fail': host_system == 'windows' and cc.get_id() == 'gcc', + }, 'strfuncs' : {}, 'string' : {}, 'strvbuilder' : {}, From b30430970ac97752b31909cf3d0281f06eed4db3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Wed, 19 Oct 2022 23:52:13 +0200 Subject: [PATCH 06/14] tests: Mark should_fail tests as can_fail Even if they are expected to fail, we should not use an inverse logic for treating their return codes. --- gio/tests/meson.build | 11 +++++------ glib/tests/meson.build | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index da56da886..c3e9c6258 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -46,7 +46,7 @@ giotypefuncs_inc = custom_target( gio_tests = { 'appmonitor' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'async-close-output-stream' : {}, 'async-splice-output-stream' : {}, @@ -56,7 +56,7 @@ gio_tests = { 'contexts' : {}, 'contenttype' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 / https://gitlab.gnome.org/GNOME/glib/-/issues/1251 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'converter-stream' : {}, 'credentials' : {}, @@ -79,8 +79,7 @@ gio_tests = { 'dependencies' : [libgdbus_example_objectmanager_dep], 'install_rpath' : installed_tests_execdir, # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', - 'can_fail' : host_system == 'windows', + 'can_fail' : host_system in ['darwin', 'windows'], }, 'inet-address' : {}, 'io-stream' : {}, @@ -104,7 +103,7 @@ gio_tests = { 'sleepy-stream' : {}, 'socket' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'socket-listener' : {}, 'socket-service' : {}, @@ -122,7 +121,7 @@ gio_tests = { 'unix-fd' : {}, 'gdbus-address-get-session' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'win32-appinfo' : {}, } diff --git a/glib/tests/meson.build b/glib/tests/meson.build index db4684348..81cb45fb3 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -18,12 +18,12 @@ glib_tests = { 'dataset' : {}, 'date' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'dir' : {}, 'environment' : { # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/1392 - 'should_fail' : host_system == 'darwin', + 'can_fail' : host_system == 'darwin', }, 'error' : {}, 'fileutils' : {}, From 3e227fb528aada441bfd7061441a59c96b0ed46f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 00:32:17 +0200 Subject: [PATCH 07/14] glocalfileinfo: Define errsv only if it's used --- gio/glocalfileinfo.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 628ea236b..cb93d7638 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -1385,7 +1385,10 @@ get_content_type (const char *basename, { guchar sniff_buffer[4096]; gsize sniff_length; - int fd, errsv; +#ifdef O_NOATIME + int errsv; +#endif + int fd; sniff_length = _g_unix_content_type_get_sniff_len (); if (sniff_length == 0 || sniff_length > 4096) From 3c56d661d8ad3c8bfa62eb85248105b7ce0c45d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 02:24:04 +0200 Subject: [PATCH 08/14] meson: Use test setup environment instead of repeating it everywhere --- gio/tests/meson.build | 2 +- glib/tests/meson.build | 2 +- gmodule/tests/meson.build | 2 +- gobject/tests/meson.build | 2 +- gobject/tests/performance/meson.build | 2 +- meson.build | 21 ++++++++++++--------- 6 files changed, 17 insertions(+), 14 deletions(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index c3e9c6258..7ae3dacf9 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -156,7 +156,7 @@ python_tests = { 'codegen.py' : { 'can_fail' : host_system == 'freebsd' }, } -test_env = environment(common_test_env) +test_env = environment() test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) test_env.set('GIO_MODULE_DIR', '') diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 81cb45fb3..0c7182016 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -264,7 +264,7 @@ if installed_tests_enabled ) endif -test_env = environment(common_test_env) +test_env = environment() test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) diff --git a/gmodule/tests/meson.build b/gmodule/tests/meson.build index e46321796..b9a0ee6f4 100644 --- a/gmodule/tests/meson.build +++ b/gmodule/tests/meson.build @@ -59,7 +59,7 @@ if glib_build_shared endforeach endif -test_env = environment(common_test_env) +test_env = environment() test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build index e476da5c7..219989848 100644 --- a/gobject/tests/meson.build +++ b/gobject/tests/meson.build @@ -131,7 +131,7 @@ python_tests = { 'mkenums.py' : {}, } -test_env = environment(common_test_env) +test_env = environment() test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) diff --git a/gobject/tests/performance/meson.build b/gobject/tests/performance/meson.build index f3a37ef4d..f747e42ae 100644 --- a/gobject/tests/performance/meson.build +++ b/gobject/tests/performance/meson.build @@ -3,7 +3,7 @@ gobject_tests = { 'performance-threaded' : { 'args' : [ '--seconds', '0' ] }, } -test_env = environment(common_test_env) +test_env = environment() test_env.set('G_TEST_SRCDIR', meson.current_source_dir()) test_env.set('G_TEST_BUILDDIR', meson.current_build_dir()) diff --git a/meson.build b/meson.build index e395d8c65..30aeb54f8 100644 --- a/meson.build +++ b/meson.build @@ -129,12 +129,23 @@ installed_tests_template_tap = files('tests/template-tap.test.in') # Don’t build the tests unless we can run them (either natively, in an exe wrapper, or by installing them for later use) build_tests = get_option('tests') and (meson.can_run_host_binaries() or installed_tests_enabled) +common_test_env = [ + 'G_DEBUG=gc-friendly', + 'G_ENABLE_DIAGNOSTIC=1', + 'MALLOC_CHECK_=2', +] + +test_timeout = 60 +test_timeout_slow = 180 + add_test_setup('default', is_default: true, exclude_suites: ['flaky', 'failing'], + env: common_test_env, ) add_test_setup('unstable_tests', + env: common_test_env, # Empty test setup, used for having different results set for flaky tests # Sadly we can't use (https://github.com/mesonbuild/meson/issues/10934): #suites: ['flaky', 'unstable'] @@ -160,6 +171,7 @@ if valgrind.found() '--suppressions=@0@'.format(meson.project_source_root() / '@0@'.format(suppression_file[0])), ], + env: common_test_env, timeout_multiplier: 10, ) endif @@ -2332,15 +2344,6 @@ if want_systemtap and enable_dtrace enable_systemtap = true endif -common_test_env = [ - 'G_DEBUG=gc-friendly', - 'G_ENABLE_DIAGNOSTIC=1', - 'MALLOC_CHECK_=2', -] - -test_timeout = 60 -test_timeout_slow = 180 - pkg = import('pkgconfig') windows = import('windows') subdir('tools') From 3d497b8f5b5316eb37db5a69432d7268c984709f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 03:07:52 +0200 Subject: [PATCH 09/14] ci: Show commands run from the test scripts It allows better debugging in case of failures. --- .gitlab-ci/coverage-docker.sh | 2 +- .gitlab-ci/run-tests.sh | 2 +- .gitlab-ci/test-msys2.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci/coverage-docker.sh b/.gitlab-ci/coverage-docker.sh index 0b9abc017..81d49e4c3 100755 --- a/.gitlab-ci/coverage-docker.sh +++ b/.gitlab-ci/coverage-docker.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex # Fixup Windows paths python3 ./.gitlab-ci/fixup-cov-paths.py _coverage/*.lcov diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index b9d5b0c69..461f31f6e 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex ./.gitlab-ci/check-missing-install-tag.py _build diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 5f9dcbd91..8b827c040 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -e +set -ex export PATH="/c/msys64/$MSYSTEM/bin:$PATH" if [[ "$MSYSTEM" == "MINGW32" ]]; then From 9e649debbe8970130f802edc828234bd4cb978db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 03:16:30 +0200 Subject: [PATCH 10/14] meson: Use default test multiplier to define timeouts So that we don't have to care about the default, being always set to 1m --- .gitlab-ci.yml | 2 +- meson.build | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ec76b9f6..3745509be 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,7 +14,7 @@ variables: COVERITY_IMAGE: "registry.gitlab.gnome.org/gnome/glib/coverity:v7" DEBIAN_IMAGE: "registry.gitlab.gnome.org/gnome/glib/debian-stable:v13" MINGW_IMAGE: "registry.gitlab.gnome.org/gnome/glib/mingw:v9" - MESON_TEST_TIMEOUT_MULTIPLIER: 2 + MESON_TEST_TIMEOUT_MULTIPLIER: 4 G_MESSAGES_DEBUG: all MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload --fatal-meson-warnings" diff --git a/meson.build b/meson.build index 30aeb54f8..7147fa942 100644 --- a/meson.build +++ b/meson.build @@ -135,17 +135,19 @@ common_test_env = [ 'MALLOC_CHECK_=2', ] -test_timeout = 60 -test_timeout_slow = 180 +test_timeout = 30 +test_timeout_slow = 90 add_test_setup('default', is_default: true, exclude_suites: ['flaky', 'failing'], env: common_test_env, + timeout_multiplier: 2, ) add_test_setup('unstable_tests', env: common_test_env, + timeout_multiplier: 2, # Empty test setup, used for having different results set for flaky tests # Sadly we can't use (https://github.com/mesonbuild/meson/issues/10934): #suites: ['flaky', 'unstable'] @@ -172,7 +174,7 @@ if valgrind.found() '@0@'.format(suppression_file[0])), ], env: common_test_env, - timeout_multiplier: 10, + timeout_multiplier: 20, ) endif From 832dd0805acd9d3405bd11c5e7229006be7f0071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 03:32:32 +0200 Subject: [PATCH 11/14] meson: Add basic summary It can nicely provide information about how glib is configured --- meson.build | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/meson.build b/meson.build index 7147fa942..fb893b5ae 100644 --- a/meson.build +++ b/meson.build @@ -2392,3 +2392,70 @@ endif gnome = import('gnome') subdir('docs/reference') + +summary({ + 'host cpu' : host_machine.cpu_family(), + 'host endian' : host_machine.endian(), + 'host system' : host_system, + 'C Compiler' : cc.get_id(), + 'C++ Compiler' : have_cxx ? cxx.get_id() : 'none', + 'shared build' : glib_build_shared, + 'static build' : glib_build_static, +}, section: 'Build environment') + +if build_machine.system() != host_system + summary({ + 'build cpu' : build_machine.cpu_family(), + 'build endian' : build_machine.endian(), + 'build system' : build_machine.system(), + }, section: 'Build environment') +endif + +summary({ + 'prefix' : glib_prefix, + 'bindir' : glib_bindir, + 'libexecdir' : glib_libexecdir, + 'pkgdatadir' : glib_pkgdatadir, + 'datadir' : glib_datadir, + 'includedir' : glib_includedir, + 'giomodulesdir' : glib_giomodulesdir, + 'localstatedir' : glib_localstatedir, +}, section: 'Directories') + +if get_option('multiarch') + summary({ + 'multiarch bindir' : glib_bindir, + 'multiarch libexecdir' : glib_libexecdir, + }, section: 'Directories') +endif + +if enable_systemtap + summary('tapset dir', get_option('tapset_install_dir'), section: 'Directories') +endif + +if host_system == 'linux' + summary({ + 'selinux' : selinux_dep.found(), + 'libmount' : libmount_dep.found(), + }, section: 'Options') +endif + +summary({ + 'xattr' : xattr_dep.length() > 0, + 'man' : get_option('man'), + 'dtrace' : get_option('dtrace'), + 'systemtap' : enable_systemtap, + 'sysprof' : libsysprof_capture_dep.found(), + 'gtk_doc' : get_option('gtk_doc'), + 'bsymbolic_functions' : get_option('bsymbolic_functions'), + 'force_posix_threads' : get_option('force_posix_threads'), + 'tests' : get_option('tests'), + 'installed_tests' : get_option('installed_tests'), + 'nls' : get_option('nls'), + 'oss_fuzz' : get_option('oss_fuzz'), + 'glib_debug' : get_option('glib_debug'), + 'glib_assert' : get_option('glib_assert'), + 'glib_checks' : get_option('glib_checks'), + 'libelf' : get_option('libelf'), + 'multiarch' : get_option('multiarch'), +}, section: 'Options') From be665cdce0b521b532119a335714cbedf70a4474 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 12:41:03 +0200 Subject: [PATCH 12/14] glib,gio/tests: Mark some spawn tests as flaky under windows It a may fail at times, but it generally works: See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346261 See: https://gitlab.gnome.org/GNOME/glib/-/jobs/2346262 --- gio/tests/meson.build | 4 +++- glib/tests/meson.build | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/gio/tests/meson.build b/gio/tests/meson.build index 7ae3dacf9..22746c97e 100644 --- a/gio/tests/meson.build +++ b/gio/tests/meson.build @@ -67,7 +67,9 @@ gio_tests = { 'fileattributematcher' : {}, 'filter-streams' : {}, 'giomodule' : {}, - 'gsubprocess' : {}, + 'gsubprocess' : { + 'suite': host_system == 'windows' ? ['flaky'] : [], + }, 'g-file' : {}, 'g-file-info' : { 'can_fail' : host_system == 'windows' and cc.get_id() != 'gcc', diff --git a/glib/tests/meson.build b/glib/tests/meson.build index 0c7182016..bbb68f984 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -114,6 +114,7 @@ glib_tests = { 'sort' : {}, 'spawn-multithreaded' : { 'can_fail': glib_build_static and host_system == 'windows', + 'suite': host_system == 'windows' ? ['flaky'] : [], }, 'spawn-path-search' : {}, 'spawn-singlethread' : { From 94273b0ebf10accde2703cc72e505043d1749e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Thu, 20 Oct 2022 06:27:13 +0200 Subject: [PATCH 13/14] ci: Remove not-printable chars from generated junit file Under windows we get some invalid chars that are causing gitlab not to be able to parse the xml files See: https://github.com/mesonbuild/meson/issues/9894 --- .gitlab-ci/test-msvc.bat | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat index c5d64fa36..1ad2e4a57 100644 --- a/.gitlab-ci/test-msvc.bat +++ b/.gitlab-ci/test-msvc.bat @@ -20,8 +20,17 @@ ninja -C _build || goto :error meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% || goto :error meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --setup=unstable_tests --suite=failing --suite=flaky +:: Workaround meson issue https://github.com/mesonbuild/meson/issues/9894 +python -c "n = '_build/meson-logs/testlog.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" || goto :error +python -c "n = '_build/meson-logs/testlog-unstable_tests.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" || goto :error + :: FIXME: can we get code coverage support? goto :EOF :error + +:: Workaround meson issue https://github.com/mesonbuild/meson/issues/9894 +python -c "n = '_build/meson-logs/testlog.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" +python -c "n = '_build/meson-logs/testlog-unstable_tests.junit.xml'; c = open(n, 'rb').read().replace(b'\x1b', b''); open(n, 'wb').write(c)" + exit /b 1 From 584a4f64c98ef92448ce4626e5ca459076abe8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Mon, 31 Oct 2022 02:30:56 +0100 Subject: [PATCH 14/14] glib/tests/meson: Ignore another new windows tests failure --- glib/tests/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/glib/tests/meson.build b/glib/tests/meson.build index bbb68f984..1f1275d80 100644 --- a/glib/tests/meson.build +++ b/glib/tests/meson.build @@ -26,7 +26,10 @@ glib_tests = { 'can_fail' : host_system == 'darwin', }, 'error' : {}, - 'fileutils' : {}, + 'fileutils' : { + # FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/2800 + 'can_fail' : host_system == 'windows' and cc.get_id() == 'msvc', + }, 'gdatetime' : { 'suite' : ['slow'], 'can_fail' : host_system == 'windows',