diff --git a/.gitignore b/.gitignore
index 6688db03ce51f2370ca756a15225a4051cddf5b0..aac4bd31709455db3674060c7759bd8645fa9dbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /build/
 /builddir/
 /obj-*/
+/tests/sysroots/
diff --git a/debian/changelog b/debian/changelog
index 1e5ae804799a733c3950d9b9b5f7d1993cc035a4..0f8aaaf4428e751d2ef2f6f9a70c5a345f478eb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
+steam-runtime-tools (0.20200403.0) UNRELEASED; urgency=medium
+
+  [ Ludovico de Nittis ]
+  * Diagnose problems with "steam:" URL handler
+  * Create a new srt_system_info_get_steam_details function
+  * tests: Generate mock sysroots programmatically
+
+  [ Simon McVittie ]
+  * tests: Factor out the directory containing mock sysroots
+  * tests: Add a script to generate the mock sysroots
+  * Build as a native package.
+
+ -- Simon McVittie <smcv@collabora.com>  Tue, 03 Apr 2020 10:23:42 +0100
+
 steam-runtime-tools (0.20200331.1-0+steamrt1.1) scout; urgency=medium
 
   * Fix version number
diff --git a/debian/clean b/debian/clean
index b5745c86cac3c87eb9b336b380ea6a9a4beb4dbf..c997053d68cc46e282059d4a372a630b6e2cfafa 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1 +1,5 @@
+_build/
+build/
+builddir/
 debian/version.txt
+obj-*/
diff --git a/debian/git-version-gen.control b/debian/git-version-gen.control
new file mode 100644
index 0000000000000000000000000000000000000000..6074e7a7d5999442ebd36fb70d33229bd8b93f00
--- /dev/null
+++ b/debian/git-version-gen.control
@@ -0,0 +1,3 @@
+Upstream: yes
+Build-Suffix: +srt
+Avoid-Build-Suffix: +vcs
diff --git a/debian/source/format b/debian/source/format
index 163aaf8d82b6c54f23c45f32895dbdfdcc27b047..89ae9db8f88b823b6a7eabf55e203658739da122 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-3.0 (quilt)
+3.0 (native)
diff --git a/meson.build b/meson.build
index 3e90ff89bc2b640d6dbb1e27f31199589746a707..5ce57bb5d07930446b6551d1a6d184c922216987 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,15 @@ abi_minor = '20200331.1'
 pkg = import('pkgconfig')
 gnome = import('gnome')
 
+# We'd like to use import('python').find_installation(), but before
+# Meson 0.50 there was a bug where it didn't have a path() method,
+# making it useless to us here.
+if get_option('python') == ''
+  python = find_program('python3.5', 'python3', required : true)
+else
+  python = find_program(get_option('python'), required : true)
+endif
+
 if get_option('man')
   pandoc = find_program('pandoc', required : true)
 
diff --git a/meson_options.txt b/meson_options.txt
index 67aa2d6954cef14360f9714adeefe7d2a9ff1ce9..6686936f6df6cc92c99dea0216997d232b5782b0 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -32,3 +32,11 @@ option(
   value : '',
   description : 'Debian-style multiarch tuple',
 )
+
+option(
+  'python',
+  type : 'string',
+  value : '',
+  description: 'Search for this Python instead of "python3.5" and "python3"'
+)
+
diff --git a/tests/generate-sysroots.py b/tests/generate-sysroots.py
new file mode 100755
index 0000000000000000000000000000000000000000..4c65ce007ab8cccc31413f0358a2f1952c3aef97
--- /dev/null
+++ b/tests/generate-sysroots.py
@@ -0,0 +1,319 @@
+#!/usr/bin/env python3
+#
+# Copyright © 2020 Collabora Ltd.
+#
+# SPDX-License-Identifier: MIT
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+import os
+import argparse
+import shutil
+
+parser = argparse.ArgumentParser()
+parser.add_argument("path")
+parser.add_argument('-i', '--install', action='store_true',
+                    help='Install the sysroot in the provided [path], using $MESON_INSTALL_DESTDIR_PREFIX as a prefix')
+args = parser.parse_args()
+
+if args.install:
+    full_path = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], args.path.lstrip("/"))
+else:
+    full_path = args.path
+
+# We recreate the chosen destination 'sysroot', to avoid potential issues with
+# old files
+try:
+    shutil.rmtree(full_path)
+except FileNotFoundError:
+    pass
+os.makedirs(full_path, mode=0o755, exist_ok=True)
+os.chdir(full_path)
+
+# Only the leaf directories need to be listed here.
+for name in '''
+debian10/usr/lib/i386-linux-gnu/dri
+debian10/usr/lib/i386-linux-gnu/vdpau
+debian10/usr/lib/x86_64-linux-gnu/dri
+debian10/usr/lib/x86_64-linux-gnu/vdpau
+debian10/run/systemd
+debian-unstable/etc
+fedora/usr/lib/dri
+fedora/usr/lib/vdpau
+fedora/usr/lib64/dri
+fedora/usr/lib64/vdpau
+fedora/run/systemd
+flatpak-example/usr/lib/dri
+flatpak-example/usr/lib/mock-abi/GL/lib/dri
+flatpak-example/usr/lib/mock-abi/dri
+flatpak-example/usr/lib/mock-abi/dri/intel-vaapi-driver
+flatpak-example/usr/lib/mock-abi/vdpau
+flatpak-example/run/host
+invalid-os-release/usr/lib
+invalid-os-release/run/host
+no-os-release/custom_path32/dri
+no-os-release/custom_path32/va
+no-os-release/custom_path32/vdpau
+no-os-release/custom_path32_2/dri
+no-os-release/custom_path32_2/va
+no-os-release/custom_path64/dri
+no-os-release/custom_path64/va
+no-os-release/usr/lib/dri
+no-os-release/usr/lib/vdpau
+steamrt/etc
+steamrt/overrides/bin
+steamrt/overrides/lib/x86_64-linux-gnu
+steamrt/overrides/lib/i386-linux-gnu
+steamrt/usr/lib
+steamrt/run/pressure-vessel
+steamrt-overrides-issues/etc
+steamrt-overrides-issues/overrides/bin
+steamrt-overrides-issues/overrides/lib/i386-linux-gnu
+steamrt-overrides-issues/overrides/lib/x86_64-linux-gnu
+steamrt-overrides-issues/usr/lib
+steamrt-unofficial/etc
+steamrt-unofficial/usr/lib
+steamrt-unofficial/proc/1
+ubuntu16/usr/lib/dri
+ubuntu16/usr/lib/mock-ubuntu-64-bit/dri
+ubuntu16/usr/lib/mock-ubuntu-64-bit/mesa
+ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau
+'''.split():
+    os.makedirs(name, mode=0o755, exist_ok=True)
+
+for name in '''
+debian10/usr/lib/i386-linux-gnu/dri/i965_dri.so
+debian10/usr/lib/i386-linux-gnu/dri/r300_dri.so
+debian10/usr/lib/i386-linux-gnu/dri/r600_drv_video.so
+debian10/usr/lib/i386-linux-gnu/dri/radeonsi_dri.so
+debian10/usr/lib/i386-linux-gnu/libEGL_mesa.so.0
+debian10/usr/lib/i386-linux-gnu/libva.so.2
+debian10/usr/lib/i386-linux-gnu/libvdpau.so.1
+debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_r600.so
+debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0
+debian10/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
+debian10/usr/lib/x86_64-linux-gnu/dri/r600_dri.so
+debian10/usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
+debian10/usr/lib/x86_64-linux-gnu/dri/radeon_dri.so
+debian10/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
+debian10/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
+debian10/usr/lib/x86_64-linux-gnu/libGL.so.1
+debian10/usr/lib/x86_64-linux-gnu/libva.so.2
+debian10/usr/lib/x86_64-linux-gnu/libvdpau.so.1
+debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1.0.0
+debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0
+debian-unstable/.dockerenv
+fedora/usr/lib/dri/i965_dri.so
+fedora/usr/lib/dri/r300_dri.so
+fedora/usr/lib/dri/r600_drv_video.so
+fedora/usr/lib/dri/radeonsi_dri.so
+fedora/usr/lib/libEGL_mesa.so.0
+fedora/usr/lib/libGL.so.1
+fedora/usr/lib/libva.so.1
+fedora/usr/lib/libvdpau.so.1
+fedora/usr/lib/vdpau/libvdpau_nouveau.so.1
+fedora/usr/lib/vdpau/libvdpau_r600.so
+fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0.0
+fedora/usr/lib64/dri/i965_dri.so
+fedora/usr/lib64/dri/r600_dri.so
+fedora/usr/lib64/dri/r600_drv_video.so
+fedora/usr/lib64/dri/radeon_dri.so
+fedora/usr/lib64/dri/radeonsi_drv_video.so
+fedora/usr/lib64/libEGL_mesa.so.0
+fedora/usr/lib64/libva.so.2
+fedora/usr/lib64/libvdpau.so.1
+fedora/usr/lib64/vdpau/libvdpau_r300.so
+fedora/usr/lib64/vdpau/libvdpau_radeonsi.so
+flatpak-example/.flatpak-info
+flatpak-example/usr/lib/dri/r300_dri.so
+flatpak-example/usr/lib/dri/r600_drv_video.so
+flatpak-example/usr/lib/mock-abi/GL/lib/dri/i965_dri.so
+flatpak-example/usr/lib/mock-abi/GL/lib/dri/r600_drv_video.so
+flatpak-example/usr/lib/mock-abi/dri/intel-vaapi-driver/i965_drv_video.so
+flatpak-example/usr/lib/mock-abi/dri/radeonsi_drv_video.so
+flatpak-example/usr/lib/mock-abi/libEGL_mesa.so.0
+flatpak-example/usr/lib/mock-abi/libva.so.2
+flatpak-example/usr/lib/mock-abi/libvdpau.so.1
+flatpak-example/usr/lib/mock-abi/vdpau/libvdpau_radeonsi.so.1
+flatpak-example/run/host/.exists
+invalid-os-release/run/host/.exists
+no-os-release/custom_path32/dri/r600_dri.so
+no-os-release/custom_path32/dri/radeon_dri.so
+no-os-release/custom_path32/va/r600_drv_video.so
+no-os-release/custom_path32/va/radeonsi_drv_video.so
+no-os-release/custom_path32/vdpau/libvdpau_r600.so.1
+no-os-release/custom_path32/vdpau/libvdpau_radeonsi.so.1
+no-os-release/custom_path32_2/dri/r300_dri.so
+no-os-release/custom_path32_2/va/nouveau_drv_video.so
+no-os-release/custom_path64/dri/i965_dri.so
+no-os-release/custom_path64/va/radeonsi_drv_video.so
+no-os-release/usr/lib/dri/i965_dri.so
+no-os-release/usr/lib/dri/r600_drv_video.so
+no-os-release/usr/lib/dri/radeonsi_dri.so
+no-os-release/usr/lib/libGL.so.1
+no-os-release/usr/lib/libva.so.1
+no-os-release/usr/lib/libvdpau.so.1
+no-os-release/usr/lib/vdpau/libvdpau_nouveau.so.1
+steamrt/overrides/bin/.keep
+steamrt/overrides/lib/x86_64-linux-gnu/libGLX_custom.so.0
+steamrt/overrides/lib/x86_64-linux-gnu/libGLX_mesa.so.0
+steamrt/overrides/lib/i386-linux-gnu/libGLX_nvidia.so.0
+steamrt/run/pressure-vessel/.exists
+steamrt-overrides-issues/overrides/bin/.keep
+steamrt-overrides-issues/overrides/lib/i386-linux-gnu/.keep
+ubuntu16/usr/lib/dri/radeonsi_dri.so
+ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/i965_dri.so
+ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeon_dri.so
+ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeonsi_drv_video.so
+ubuntu16/usr/lib/mock-ubuntu-64-bit/libva.so.1
+ubuntu16/usr/lib/mock-ubuntu-64-bit/mesa/libGL.so.1
+ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1.0.0
+ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1.0.0
+'''.split():
+    os.makedirs(os.path.dirname(name), mode=0o755, exist_ok=True)
+    open(name, 'w').close()
+
+for name, target in {
+    'debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so':
+        'libvdpau_radeonsi.so.1.0.0',
+    'debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1':
+        'libvdpau_radeonsi.so.1.0.0',
+    'debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1':
+        'libvdpau_r600.so.1.0.0',
+    'debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so':
+        'libvdpau_radeonsi.so.1.0.0',
+    'debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1':
+        'libvdpau_radeonsi.so.1.0.0',
+    'fedora/usr/lib/vdpau/libvdpau_radeonsi.so':
+        'libvdpau_radeonsi.so.1.0.0',
+    'fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1':
+        'libvdpau_radeonsi.so.1.0.0',
+    'fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0':
+        'libvdpau_radeonsi.so.1.0.0',
+    'fedora/usr/lib64/vdpau/libvdpau_r300.so.1':
+        'libvdpau_r300.so',
+    'fedora/usr/lib64/vdpau/libvdpau_radeonsi.so.1':
+        'libvdpau_radeonsi.so',
+    'steamrt/etc/os-release':
+        '../usr/lib/os-release',
+    'steamrt/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1':
+        '/run/host/usr/lib/libgcc_s.so.1',
+    'steamrt-overrides-issues/etc/os-release':
+        '../usr/lib/os-release',
+    'steamrt-overrides-issues/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1':
+        '/run/host/usr/lib/libgcc_s.so.1',
+    'steamrt-unofficial/etc/os-release':
+        '../usr/lib/os-release',
+    'ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1':
+        'libvdpau_r600.so.1.0.0',
+    'ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so':
+        'libvdpau_radeonsi.so.1.0.0',
+    'ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1':
+        'libvdpau_radeonsi.so.1.0.0',
+}.items():
+    os.makedirs(os.path.dirname(name), mode=0o755, exist_ok=True)
+    try:
+        os.symlink(target, name)
+    except FileExistsError:
+        pass
+
+with open('debian10/usr/lib/os-release', 'w') as writer:
+    writer.write('''\
+PRETTY_NAME="Debian GNU/Linux 10 (buster)"
+NAME="Debian GNU/Linux"
+VERSION_ID="10"
+VERSION="10 (buster)"
+VERSION_CODENAME=buster
+ID=debian
+HOME_URL="https://www.debian.org/"
+SUPPORT_URL="https://www.debian.org/support"
+BUG_REPORT_URL="https://bugs.debian.org/"
+''')
+
+with open('debian10/run/systemd/container', 'w') as writer:
+    writer.write('whatever\n')
+
+with open('debian-unstable/etc/os-release', 'w') as writer:
+    writer.write('''\
+PRETTY_NAME="Debian GNU/Linux bullseye/sid"
+NAME="Debian GNU/Linux"
+ID=debian
+HOME_URL="https://www.debian.org/"
+SUPPORT_URL="https://www.debian.org/support"
+BUG_REPORT_URL="https://bugs.debian.org/"
+''')
+
+with open('fedora/run/systemd/container', 'w') as writer:
+    writer.write('docker\n')
+
+with open('invalid-os-release/usr/lib/os-release', 'w') as writer:
+    writer.write('''\
+ID=steamrt
+PRETTY_NAME="The first name"
+VERSION_CODENAME
+VERSION_ID="foo
+PRETTY_NAME="The second name"
+NAME="This file does not end with a newline"''')
+
+for name in (
+    'steamrt/usr/lib/os-release',
+    'steamrt-overrides-issues/usr/lib/os-release',
+):
+    with open(name, 'w') as writer:
+        writer.write('''\
+NAME="Steam Runtime"
+VERSION="1 (scout)"
+ID=steamrt
+ID_LIKE=ubuntu
+PRETTY_NAME="Steam Runtime 1 (scout)"
+VERSION_ID="1"
+BUILD_ID="0.20190924.0"
+VARIANT=Platform
+VARIANT_ID="com.valvesoftware.steamruntime.platform-amd64_i386-scout"
+''')
+
+with open('steamrt-unofficial/usr/lib/os-release', 'w') as writer:
+    writer.write('''\
+NAME="Steam Runtime"
+VERSION="1 (scout)"
+ID=steamrt
+ID_LIKE=ubuntu
+PRETTY_NAME="Steam Runtime 1 (scout)"
+VERSION_ID="1"
+BUILD_ID="unofficial-0.20190924.0"
+VARIANT=Platform
+VARIANT_ID="com.valvesoftware.steamruntime.platform-amd64_i386-scout"
+''')
+
+with open('steamrt-unofficial/proc/1/cgroup', 'w') as writer:
+    writer.write('''\
+11:perf_event:/docker/9999999999999999999999999999999999999999999999999999999999999999
+10:freezer:/docker/9999999999999999999999999999999999999999999999999999999999999999
+9:memory:/docker/9999999999999999999999999999999999999999999999999999999999999999
+8:rdma:/
+7:devices:/docker/9999999999999999999999999999999999999999999999999999999999999999
+6:blkio:/docker/9999999999999999999999999999999999999999999999999999999999999999
+5:net_cls,net_prio:/docker/9999999999999999999999999999999999999999999999999999999999999999
+4:cpu,cpuacct:/docker/9999999999999999999999999999999999999999999999999999999999999999
+3:cpuset:/docker/9999999999999999999999999999999999999999999999999999999999999999
+2:pids:/docker/9999999999999999999999999999999999999999999999999999999999999999
+1:name=systemd:/docker/9999999999999999999999999999999999999999999999999999999999999999
+0::/system.slice/docker.service
+''')
diff --git a/tests/graphics.c b/tests/graphics.c
index a693b8586452b7a396b45ddca3c444e22a19a876..78558ff1e30f21053d0f264fa7fa6e0d648e3fa4 100644
--- a/tests/graphics.c
+++ b/tests/graphics.c
@@ -44,6 +44,7 @@ typedef struct
 {
   gchar *srcdir;
   gchar *builddir;
+  gchar *sysroots;
   gchar *sysroot;
   gchar **fake_icds_envp;
 } Fixture;
@@ -76,6 +77,8 @@ setup (Fixture *f,
   if (f->builddir == NULL)
     f->builddir = g_path_get_dirname (argv0);
 
+  f->sysroots = g_build_filename (f->builddir, "sysroots", NULL);
+
   if (g_chdir (f->srcdir) != 0)
     g_error ("chdir %s: %s", f->srcdir, g_strerror (errno));
 
@@ -185,6 +188,7 @@ teardown (Fixture *f,
   g_free (f->srcdir);
   g_free (f->builddir);
   g_free (f->sysroot);
+  g_free (f->sysroots);
   g_strfreev (f->fake_icds_envp);
 }
 
@@ -1910,7 +1914,7 @@ test_dri_debian10 (Fixture *f,
                                            "/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so",
                                            NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "debian10", NULL);
+  sysroot = g_build_filename (f->sysroots, "debian10", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
   envp = g_environ_unsetenv (envp, "LIBGL_DRIVERS_PATH");
@@ -1996,7 +2000,7 @@ test_dri_fedora (Fixture *f,
                                        "/usr/lib64/dri/radeonsi_drv_video.so",
                                        NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "fedora", NULL);
+  sysroot = g_build_filename (f->sysroots, "fedora", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
   envp = g_environ_unsetenv (envp, "LIBGL_DRIVERS_PATH");
@@ -2046,7 +2050,7 @@ test_dri_ubuntu16 (Fixture *f,
   const gchar *va_api_suffixes[] = {"/lib/mock-ubuntu-64-bit/dri/radeonsi_drv_video.so",
                                     NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "ubuntu16", NULL);
+  sysroot = g_build_filename (f->sysroots, "ubuntu16", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
   envp = g_environ_setenv (envp, "SRT_TEST_FORCE_ELF", "64", TRUE);
@@ -2123,7 +2127,7 @@ test_dri_with_env (Fixture *f,
       return;
     }
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "no-os-release", NULL);
+  sysroot = g_build_filename (f->sysroots, "no-os-release", NULL);
 
   libgl = g_build_filename (sysroot, "custom_path32", "dri", NULL);
   libva = g_build_filename (sysroot, "custom_path32", "va", NULL);
@@ -2171,7 +2175,10 @@ test_dri_with_env (Fixture *f,
   check_list_extra (va_api, G_N_ELEMENTS(va_api_suffixes)-1, SRT_GRAPHICS_VAAPI_MODULE);
   g_list_free_full (va_api, g_object_unref);
 
-  /* Test relative path */
+  /* Test relative path.
+   * Move to the build directory because otherwise we can't use the relative sysroots path */
+  if (g_chdir (f->builddir) != 0)
+    g_error ("chdir %s: %s", f->builddir, g_strerror (errno));
   g_free (libgl);
   g_free (libgl2);
   g_free (libgl3);
@@ -2232,7 +2239,7 @@ test_dri_flatpak (Fixture *f,
                                     "/usr/lib/mock-abi/GL/lib/dri/r600_drv_video.so",
                                     NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "flatpak-example", NULL);
+  sysroot = g_build_filename (f->sysroots, "flatpak-example", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
   envp = g_environ_unsetenv (envp, "LIBGL_DRIVERS_PATH");
@@ -2401,7 +2408,7 @@ test_vdpau (Fixture *f,
 
       g_test_message ("%s: %s", test->sysroot, test->description);
 
-      sysroot = g_build_filename (f->srcdir, "sysroots", test->sysroot, NULL);
+      sysroot = g_build_filename (f->sysroots, test->sysroot, NULL);
       envp = g_get_environ ();
       envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
       if (test->vdpau_path_env == NULL)
@@ -2444,6 +2451,9 @@ test_vdpau (Fixture *f,
       if (vdpau_relative_path != NULL)
         {
           envp = g_environ_setenv (envp, "VDPAU_DRIVER_PATH", vdpau_relative_path, TRUE);
+          /* Move to the build directory because otherwise we can't use the relative sysroots path */
+          if (g_chdir (f->builddir) != 0)
+            g_error ("chdir %s: %s", f->builddir, g_strerror (errno));
           srt_system_info_set_environ (info, envp);
           vdpau = srt_system_info_list_vdpau_drivers (info, test->multiarch_tuple, SRT_DRIVER_FLAGS_NONE);
           check_list_suffixes (vdpau, test->vdpau_suffixes, SRT_GRAPHICS_VDPAU_MODULE);
@@ -2486,7 +2496,7 @@ test_glx_debian (Fixture *f,
   const gchar *glx_paths_x86_64[] = {"/lib/x86_64-linux-gnu/libGLX_mesa.so.0",
                                      NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "debian10", NULL);
+  sysroot = g_build_filename (f->sysroots, "debian10", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
 
@@ -2536,7 +2546,7 @@ test_glx_container (Fixture *f,
                                      "/lib/x86_64-linux-gnu/libGLX_mesa.so.0",
                                      NULL};
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "steamrt", NULL);
+  sysroot = g_build_filename (f->sysroots, "steamrt", NULL);
   envp = g_get_environ ();
   envp = g_environ_setenv (envp, "SRT_TEST_SYSROOT", sysroot, TRUE);
 
diff --git a/tests/meson.build b/tests/meson.build
index cb8183b1907352588d1a09197dc8a554ac584027..3f089b5541dc69c58387e7d5f2d44874671821cd 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -61,12 +61,19 @@ install_subdir('expectations_with_missings', install_dir : tests_dir)
 # Vulkan *.json files. (The order of EGL *.json files is well-defined.)
 install_subdir('fake-icds', install_dir : tests_dir)
 install_subdir('fake-steam-runtime', install_dir : tests_dir)
-# Instead of doing `install_subdir` for "sysroot" we use a custom install
-# script because with `install_subdir` the symlinks don't get preserved,
-# but instead they are copied as files. And this behavior breaks our tests.
-src = meson.current_source_dir() + '/' + 'sysroots'
-# Note that the `-a` option is Linux specific
-meson.add_install_script('sh', '-c', 'cp -a "$1" "${DESTDIR}/${MESON_INSTALL_PREFIX}/$2"', 'sh', src, tests_dir)
+
+meson.add_postconf_script(
+  python.path(),
+  join_paths(meson.source_root(), 'tests', 'generate-sysroots.py'),
+  join_paths(meson.current_build_dir(), 'sysroots'),
+)
+
+meson.add_install_script(
+  python.path(),
+  join_paths(meson.source_root(), 'tests', 'generate-sysroots.py'),
+  '--install',
+  join_paths(tests_dir, 'sysroots'),
+)
 
 # These are all the same: they just exit 0.
 foreach helper : [
diff --git a/tests/sysroots/debian-unstable/.dockerenv b/tests/sysroots/debian-unstable/.dockerenv
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian-unstable/etc/os-release b/tests/sysroots/debian-unstable/etc/os-release
deleted file mode 100644
index 55f123897e199d8115372e4ff3bb6fb3b5643221..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian-unstable/etc/os-release
+++ /dev/null
@@ -1,6 +0,0 @@
-PRETTY_NAME="Debian GNU/Linux bullseye/sid"
-NAME="Debian GNU/Linux"
-ID=debian
-HOME_URL="https://www.debian.org/"
-SUPPORT_URL="https://www.debian.org/support"
-BUG_REPORT_URL="https://bugs.debian.org/"
diff --git a/tests/sysroots/debian10/run/systemd/container b/tests/sysroots/debian10/run/systemd/container
deleted file mode 100644
index 982793c32ee7f2df6107a721a7814fcf5ec39bbd..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/run/systemd/container
+++ /dev/null
@@ -1 +0,0 @@
-whatever
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/i965_dri.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/r300_dri.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/r300_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/r600_drv_video.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/radeonsi_dri.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/dri/radeonsi_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libEGL_mesa.so.0 b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libEGL_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libva.so.2 b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libva.so.2
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libvdpau.so.1 b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_r600.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_r600.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0 b/tests/sysroots/debian10/usr/lib/i386-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/os-release b/tests/sysroots/debian10/usr/lib/os-release
deleted file mode 100644
index 9b5419df8bfb3ee0266ea3f6b46b6d349c06ce97..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/os-release
+++ /dev/null
@@ -1,9 +0,0 @@
-PRETTY_NAME="Debian GNU/Linux 10 (buster)"
-NAME="Debian GNU/Linux"
-VERSION_ID="10"
-VERSION="10 (buster)"
-VERSION_CODENAME=buster
-ID=debian
-HOME_URL="https://www.debian.org/"
-SUPPORT_URL="https://www.debian.org/support"
-BUG_REPORT_URL="https://bugs.debian.org/"
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/i965_dri.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/r600_dri.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/r600_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/radeon_dri.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/radeon_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libGL.so.1 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libGL.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libva.so.2 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libva.so.2
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libvdpau.so.1 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1
deleted file mode 120000
index 6645179651d23785fd525c99a83c87d62c24387c..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_r600.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1.0.0 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_r600.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0 b/tests/sysroots/debian10/usr/lib/x86_64-linux-gnu/vdpau/libvdpau_radeonsi.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/run/systemd/container b/tests/sysroots/fedora/run/systemd/container
deleted file mode 100644
index bdb9670965e4db736d9bdab6edce7cf0d688bea9..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/run/systemd/container
+++ /dev/null
@@ -1 +0,0 @@
-docker
diff --git a/tests/sysroots/fedora/usr/lib/dri/i965_dri.so b/tests/sysroots/fedora/usr/lib/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/dri/r300_dri.so b/tests/sysroots/fedora/usr/lib/dri/r300_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/dri/r600_drv_video.so b/tests/sysroots/fedora/usr/lib/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/dri/radeonsi_dri.so b/tests/sysroots/fedora/usr/lib/dri/radeonsi_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/libEGL_mesa.so.0 b/tests/sysroots/fedora/usr/lib/libEGL_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/libGL.so.1 b/tests/sysroots/fedora/usr/lib/libGL.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/libva.so.1 b/tests/sysroots/fedora/usr/lib/libva.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/libvdpau.so.1 b/tests/sysroots/fedora/usr/lib/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_nouveau.so.1 b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_nouveau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_r600.so b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_r600.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0 b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0.0 b/tests/sysroots/fedora/usr/lib/vdpau/libvdpau_radeonsi.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/dri/i965_dri.so b/tests/sysroots/fedora/usr/lib64/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/dri/r600_dri.so b/tests/sysroots/fedora/usr/lib64/dri/r600_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/dri/r600_drv_video.so b/tests/sysroots/fedora/usr/lib64/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/dri/radeon_dri.so b/tests/sysroots/fedora/usr/lib64/dri/radeon_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/dri/radeonsi_drv_video.so b/tests/sysroots/fedora/usr/lib64/dri/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/libEGL_mesa.so.0 b/tests/sysroots/fedora/usr/lib64/libEGL_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/libva.so.2 b/tests/sysroots/fedora/usr/lib64/libva.so.2
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/libvdpau.so.1 b/tests/sysroots/fedora/usr/lib64/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_r300.so b/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_r300.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_r300.so.1 b/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_r300.so.1
deleted file mode 120000
index 980ac00a7f53a4e28231c6ea16bbcb8d057e4510..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_r300.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_r300.so
\ No newline at end of file
diff --git a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_radeonsi.so b/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_radeonsi.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_radeonsi.so.1
deleted file mode 120000
index 47629d3133a70cdf821f76cc330fed7a2c3f1e70..0000000000000000000000000000000000000000
--- a/tests/sysroots/fedora/usr/lib64/vdpau/libvdpau_radeonsi.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so
\ No newline at end of file
diff --git a/tests/sysroots/flatpak-example/.flatpak-info b/tests/sysroots/flatpak-example/.flatpak-info
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/run/host/.exists b/tests/sysroots/flatpak-example/run/host/.exists
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/dri/r300_dri.so b/tests/sysroots/flatpak-example/usr/lib/dri/r300_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/dri/r600_drv_video.so b/tests/sysroots/flatpak-example/usr/lib/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/GL/lib/dri/i965_dri.so b/tests/sysroots/flatpak-example/usr/lib/mock-abi/GL/lib/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/GL/lib/dri/r600_drv_video.so b/tests/sysroots/flatpak-example/usr/lib/mock-abi/GL/lib/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/dri/intel-vaapi-driver/i965_drv_video.so b/tests/sysroots/flatpak-example/usr/lib/mock-abi/dri/intel-vaapi-driver/i965_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/dri/radeonsi_drv_video.so b/tests/sysroots/flatpak-example/usr/lib/mock-abi/dri/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/libEGL_mesa.so.0 b/tests/sysroots/flatpak-example/usr/lib/mock-abi/libEGL_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/libva.so.2 b/tests/sysroots/flatpak-example/usr/lib/mock-abi/libva.so.2
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/libvdpau.so.1 b/tests/sysroots/flatpak-example/usr/lib/mock-abi/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/flatpak-example/usr/lib/mock-abi/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/flatpak-example/usr/lib/mock-abi/vdpau/libvdpau_radeonsi.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/invalid-os-release/run/host/.exists b/tests/sysroots/invalid-os-release/run/host/.exists
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/invalid-os-release/usr/lib/os-release b/tests/sysroots/invalid-os-release/usr/lib/os-release
deleted file mode 100644
index c951a991f894bd325018b2ece0b997fffdb715df..0000000000000000000000000000000000000000
--- a/tests/sysroots/invalid-os-release/usr/lib/os-release
+++ /dev/null
@@ -1,6 +0,0 @@
-ID=steamrt
-PRETTY_NAME="The first name"
-VERSION_CODENAME
-VERSION_ID="foo
-PRETTY_NAME="The second name"
-NAME="This file does not end with a newline"
\ No newline at end of file
diff --git a/tests/sysroots/no-os-release/custom_path32/dri/r600_dri.so b/tests/sysroots/no-os-release/custom_path32/dri/r600_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32/dri/radeon_dri.so b/tests/sysroots/no-os-release/custom_path32/dri/radeon_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32/va/r600_drv_video.so b/tests/sysroots/no-os-release/custom_path32/va/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32/va/radeonsi_drv_video.so b/tests/sysroots/no-os-release/custom_path32/va/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32/vdpau/libvdpau_r600.so.1 b/tests/sysroots/no-os-release/custom_path32/vdpau/libvdpau_r600.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/no-os-release/custom_path32/vdpau/libvdpau_radeonsi.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32_2/dri/r300_dri.so b/tests/sysroots/no-os-release/custom_path32_2/dri/r300_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path32_2/va/nouveau_drv_video.so b/tests/sysroots/no-os-release/custom_path32_2/va/nouveau_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path64/dri/i965_dri.so b/tests/sysroots/no-os-release/custom_path64/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/custom_path64/va/radeonsi_drv_video.so b/tests/sysroots/no-os-release/custom_path64/va/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/dri/i965_dri.so b/tests/sysroots/no-os-release/usr/lib/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/dri/r600_drv_video.so b/tests/sysroots/no-os-release/usr/lib/dri/r600_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/dri/radeonsi_dri.so b/tests/sysroots/no-os-release/usr/lib/dri/radeonsi_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/libGL.so.1 b/tests/sysroots/no-os-release/usr/lib/libGL.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/libva.so.1 b/tests/sysroots/no-os-release/usr/lib/libva.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/libvdpau.so.1 b/tests/sysroots/no-os-release/usr/lib/libvdpau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/no-os-release/usr/lib/vdpau/libvdpau_nouveau.so.1 b/tests/sysroots/no-os-release/usr/lib/vdpau/libvdpau_nouveau.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt-overrides-issues/etc/os-release b/tests/sysroots/steamrt-overrides-issues/etc/os-release
deleted file mode 120000
index c4c75b419cfd1a831f48769e8b4ac8680f728654..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-overrides-issues/etc/os-release
+++ /dev/null
@@ -1 +0,0 @@
-../usr/lib/os-release
\ No newline at end of file
diff --git a/tests/sysroots/steamrt-overrides-issues/overrides/bin/.keep b/tests/sysroots/steamrt-overrides-issues/overrides/bin/.keep
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt-overrides-issues/overrides/lib/i386-linux-gnu/.keep b/tests/sysroots/steamrt-overrides-issues/overrides/lib/i386-linux-gnu/.keep
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt-overrides-issues/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1 b/tests/sysroots/steamrt-overrides-issues/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1
deleted file mode 120000
index 8aa9f9f730a56022549af3042c661c9e41f1c076..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-overrides-issues/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1
+++ /dev/null
@@ -1 +0,0 @@
-/run/host/usr/lib/libgcc_s.so.1
\ No newline at end of file
diff --git a/tests/sysroots/steamrt-overrides-issues/usr/lib/os-release b/tests/sysroots/steamrt-overrides-issues/usr/lib/os-release
deleted file mode 100644
index 064dec3e50ce858cccfac132e4b198ed87ef1bd4..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-overrides-issues/usr/lib/os-release
+++ /dev/null
@@ -1,9 +0,0 @@
-NAME="Steam Runtime"
-VERSION="1 (scout)"
-ID=steamrt
-ID_LIKE=ubuntu
-PRETTY_NAME="Steam Runtime 1 (scout)"
-VERSION_ID="1"
-BUILD_ID="0.20190924.0"
-VARIANT=Platform
-VARIANT_ID="com.valvesoftware.steamruntime.platform-amd64_i386-scout"
diff --git a/tests/sysroots/steamrt-unofficial/etc/os-release b/tests/sysroots/steamrt-unofficial/etc/os-release
deleted file mode 120000
index c4c75b419cfd1a831f48769e8b4ac8680f728654..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-unofficial/etc/os-release
+++ /dev/null
@@ -1 +0,0 @@
-../usr/lib/os-release
\ No newline at end of file
diff --git a/tests/sysroots/steamrt-unofficial/proc/1/cgroup b/tests/sysroots/steamrt-unofficial/proc/1/cgroup
deleted file mode 100644
index 72dac858cf44f4c3a0b6e73276a9e6d8e770e767..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-unofficial/proc/1/cgroup
+++ /dev/null
@@ -1,12 +0,0 @@
-11:perf_event:/docker/9999999999999999999999999999999999999999999999999999999999999999
-10:freezer:/docker/9999999999999999999999999999999999999999999999999999999999999999
-9:memory:/docker/9999999999999999999999999999999999999999999999999999999999999999
-8:rdma:/
-7:devices:/docker/9999999999999999999999999999999999999999999999999999999999999999
-6:blkio:/docker/9999999999999999999999999999999999999999999999999999999999999999
-5:net_cls,net_prio:/docker/9999999999999999999999999999999999999999999999999999999999999999
-4:cpu,cpuacct:/docker/9999999999999999999999999999999999999999999999999999999999999999
-3:cpuset:/docker/9999999999999999999999999999999999999999999999999999999999999999
-2:pids:/docker/9999999999999999999999999999999999999999999999999999999999999999
-1:name=systemd:/docker/9999999999999999999999999999999999999999999999999999999999999999
-0::/system.slice/docker.service
diff --git a/tests/sysroots/steamrt-unofficial/usr/lib/os-release b/tests/sysroots/steamrt-unofficial/usr/lib/os-release
deleted file mode 100644
index 75e8b300d70fcd5b4a6b8a8906b0cd3fff79c783..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt-unofficial/usr/lib/os-release
+++ /dev/null
@@ -1,9 +0,0 @@
-NAME="Steam Runtime"
-VERSION="1 (scout)"
-ID=steamrt
-ID_LIKE=ubuntu
-PRETTY_NAME="Steam Runtime 1 (scout)"
-VERSION_ID="1"
-BUILD_ID="unofficial-0.20190924.0"
-VARIANT=Platform
-VARIANT_ID="com.valvesoftware.steamruntime.platform-amd64_i386-scout"
diff --git a/tests/sysroots/steamrt/etc/os-release b/tests/sysroots/steamrt/etc/os-release
deleted file mode 120000
index c4c75b419cfd1a831f48769e8b4ac8680f728654..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt/etc/os-release
+++ /dev/null
@@ -1 +0,0 @@
-../usr/lib/os-release
\ No newline at end of file
diff --git a/tests/sysroots/steamrt/overrides/bin/.keep b/tests/sysroots/steamrt/overrides/bin/.keep
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt/overrides/lib/i386-linux-gnu/libGLX_nvidia.so.0 b/tests/sysroots/steamrt/overrides/lib/i386-linux-gnu/libGLX_nvidia.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libGLX_custom.so.0 b/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libGLX_custom.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libGLX_mesa.so.0 b/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libGLX_mesa.so.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1 b/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1
deleted file mode 120000
index 8aa9f9f730a56022549af3042c661c9e41f1c076..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt/overrides/lib/x86_64-linux-gnu/libgcc_s.so.1
+++ /dev/null
@@ -1 +0,0 @@
-/run/host/usr/lib/libgcc_s.so.1
\ No newline at end of file
diff --git a/tests/sysroots/steamrt/run/pressure-vessel/.exists b/tests/sysroots/steamrt/run/pressure-vessel/.exists
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/steamrt/usr/lib/os-release b/tests/sysroots/steamrt/usr/lib/os-release
deleted file mode 100644
index 064dec3e50ce858cccfac132e4b198ed87ef1bd4..0000000000000000000000000000000000000000
--- a/tests/sysroots/steamrt/usr/lib/os-release
+++ /dev/null
@@ -1,9 +0,0 @@
-NAME="Steam Runtime"
-VERSION="1 (scout)"
-ID=steamrt
-ID_LIKE=ubuntu
-PRETTY_NAME="Steam Runtime 1 (scout)"
-VERSION_ID="1"
-BUILD_ID="0.20190924.0"
-VARIANT=Platform
-VARIANT_ID="com.valvesoftware.steamruntime.platform-amd64_i386-scout"
diff --git a/tests/sysroots/ubuntu16/usr/lib/dri/radeonsi_dri.so b/tests/sysroots/ubuntu16/usr/lib/dri/radeonsi_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/i965_dri.so b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/i965_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeon_dri.so b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeon_dri.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeonsi_drv_video.so b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/dri/radeonsi_drv_video.so
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/libva.so.1 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/libva.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/mesa/libGL.so.1 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/mesa/libGL.so.1
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1
deleted file mode 120000
index 6645179651d23785fd525c99a83c87d62c24387c..0000000000000000000000000000000000000000
--- a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_r600.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1.0.0 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_r600.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1
deleted file mode 120000
index 7d720b5733249de86ebe74f714e3d4168e9b47b1..0000000000000000000000000000000000000000
--- a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1
+++ /dev/null
@@ -1 +0,0 @@
-libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
diff --git a/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1.0.0 b/tests/sysroots/ubuntu16/usr/lib/mock-ubuntu-64-bit/vdpau/libvdpau_radeonsi.so.1.0.0
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/tests/system-info.c b/tests/system-info.c
index cd0ed810872a29657b11a6dc2cedc25dfc4c389a..02196391ee1070f92b59930363840310c4a23355 100644
--- a/tests/system-info.c
+++ b/tests/system-info.c
@@ -48,6 +48,7 @@ typedef struct
 {
   gchar *srcdir;
   gchar *builddir;
+  gchar *sysroots;
 } Fixture;
 
 typedef struct
@@ -69,6 +70,8 @@ setup (Fixture *f,
 
   if (f->builddir == NULL)
     f->builddir = g_path_get_dirname (argv0);
+
+  f->sysroots = g_build_filename (f->builddir, "sysroots", NULL);
 }
 
 static void
@@ -79,6 +82,7 @@ teardown (Fixture *f,
 
   g_free (f->srcdir);
   g_free (f->builddir);
+  g_free (f->sysroots);
 
   /* We expect that fake_home already cleaned this up, but just to be sure we
    * do it too */
@@ -1278,7 +1282,7 @@ os_debian10 (Fixture *f,
   gchar *sysroot;
   gchar *s;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "debian10", NULL);
+  sysroot = g_build_filename (f->sysroots, "debian10", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1338,7 +1342,7 @@ os_debian_unstable (Fixture *f,
   gchar *sysroot;
   gchar *s;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "debian-unstable", NULL);
+  sysroot = g_build_filename (f->sysroots, "debian-unstable", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1399,7 +1403,7 @@ os_steamrt (Fixture *f,
   gchar *s;
   SrtRuntimeIssues runtime_issues;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "steamrt", NULL);
+  sysroot = g_build_filename (f->sysroots, "steamrt", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1477,7 +1481,7 @@ os_steamrt_unofficial (Fixture *f,
   gchar *s;
   SrtRuntimeIssues runtime_issues;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "steamrt-unofficial", NULL);
+  sysroot = g_build_filename (f->sysroots, "steamrt-unofficial", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1558,7 +1562,7 @@ os_invalid_os_release (Fixture *f,
   gchar *s;
   SrtRuntimeIssues runtime_issues;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "invalid-os-release", NULL);
+  sysroot = g_build_filename (f->sysroots, "invalid-os-release", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1632,7 +1636,7 @@ os_no_os_release (Fixture *f,
   gchar *sysroot;
   gchar *s;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "no-os-release", NULL);
+  sysroot = g_build_filename (f->sysroots, "no-os-release", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1693,7 +1697,7 @@ overrides (Fixture *f,
   gsize i;
   gboolean seen_link;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "steamrt", NULL);
+  sysroot = g_build_filename (f->sysroots, "steamrt", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1759,7 +1763,7 @@ overrides_issues (Fixture *f,
   gsize i;
   gboolean seen_link;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "steamrt-overrides-issues", NULL);
+  sysroot = g_build_filename (f->sysroots, "steamrt-overrides-issues", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -1819,7 +1823,7 @@ overrides_not_available (Fixture *f,
   gchar **issues;
   gchar *sysroot;
 
-  sysroot = g_build_filename (f->srcdir, "sysroots", "debian10", NULL);
+  sysroot = g_build_filename (f->sysroots, "debian10", NULL);
 
   info = srt_system_info_new (NULL);
   srt_system_info_set_sysroot (info, sysroot);
@@ -2238,7 +2242,7 @@ test_containers (Fixture *f,
 
       g_test_message ("%s: %s", test->sysroot, test->description);
 
-      sysroot = g_build_filename (f->srcdir, "sysroots", test->sysroot, NULL);
+      sysroot = g_build_filename (f->sysroots, test->sysroot, NULL);
 
       info = srt_system_info_new (NULL);
       g_assert_nonnull (info);