Skip to content

Fix various build-time test failures

Simon McVittie requested to merge wip/smcv/build-failures into master

Mostly follow-ups for the recent Meson version bump.


  • test-utils: Add a wrapper for g_test_message that splits lines if needed

    GLib < 2.70 would corrupt TAP output if given something like g_test_message ("%s", "foo\nbar"), which would come out as

      # foo
      bar

    Newer versions correctly log it as

      # foo
      # bar

    Forwarded: https://gitlab.gnome.org/GNOME/libglnx/-/merge_requests/38

  • tests: Add more debug info for identify-library-abi

  • tests: Test identify-library-abi against GLib, not glibc

    Recent versions of glibc (2.34+) are installed as a regular file ${libdir}/libc.so.6 instead of a symbolic link ${libdir}/libc.so.6 -> libc-2.x.so, which identify-library-abi doesn't handle.

    This fixes build-time test failures on Debian testing and other recent rolling releases.

  • bin: Document that identify-library-api --directory only looks at symlinks

    This is fine for its use in steam-runtime/setup.sh, but could be a problem if used more generally.

  • build: Simplify how we check for GLib TAP support

  • tests: Call _srt_tests_init() before _srt_global_setup_sysroots()

    In some older GLib versions, _srt_global_setup_sysroots() can emit a debug message (because it calls subprocesses) which by default corrupts our structured output on stdout. Redirect logging to stderr before this can happen.

    This fixes build-time test failures on Steam Runtime 2 'soldier' (and presumably Debian 10).

  • tests: Divert stdout to stderr at a lower level when using old GLib

    In GLib 2.48.x and older (before the addition of structured logging), g_log() messages ended up being written to stdout via write(), so reassigning the stdout variable didn't work. This resulted in our tests corrupting their machine-readable stdout on Steam Runtime 1½ 'heavy'.

  • launch-client: Redirect stdout to stderr sooner

    We need to do this before the earliest point where we might g_debug(). This fixes corrupted TAP output during build-time tests on Steam Runtime 1½ 'heavy' when G_MESSAGES_DEBUG=all and at least one of stdin, stdout or stderr is a terminal.

  • tests: Don't rely on convenience syntax for GLib.VariantType constructor

    This fixes test failures on Steam Runtime 1½ 'heavy'.

  • CI: Additionally build the package on heavy, soldier and sniper

    This avoids nasty surprises when we try to do a release and find that one of these suites has regressed.

  • build-aux: Build on soldier and sniper

    The infrastructure to build on heavy and medic is there, but we don't do that right now since their SDK images are not public.

  • test-init: Flush stdout after printing messages

    Otherwise, the debug information that we need to diagnose assertion failures can get lost, most notably g_test_message().

    GLib's default GPrintFunc already flushes stdout, but our replacement didn't.

  • tests: Add more debug in graphics test to indicate where we are

    I've seen intermittent test failures in this test (on OBS, not reproducible locally) and these messages are an attempt to narrow down where the problem is.

Edited by Simon McVittie

Merge request reports