Skip to content
Snippets Groups Projects
Commit a8759e9b authored by Ludovico de Nittis's avatar Ludovico de Nittis :palm_tree:
Browse files

tests: Generate mock sysroots programmatically

parent 558ede05
No related branches found
No related tags found
No related merge requests found
Pipeline #2880 passed
Showing
with 14 additions and 24 deletions
...@@ -39,6 +39,7 @@ abi_minor = '20200331.1' ...@@ -39,6 +39,7 @@ abi_minor = '20200331.1'
pkg = import('pkgconfig') pkg = import('pkgconfig')
gnome = import('gnome') gnome = import('gnome')
python3 = import('python3')
if get_option('man') if get_option('man')
pandoc = find_program('pandoc', required : true) pandoc = find_program('pandoc', required : true)
......
...@@ -61,12 +61,19 @@ install_subdir('expectations_with_missings', install_dir : tests_dir) ...@@ -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.) # Vulkan *.json files. (The order of EGL *.json files is well-defined.)
install_subdir('fake-icds', install_dir : tests_dir) install_subdir('fake-icds', install_dir : tests_dir)
install_subdir('fake-steam-runtime', 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, meson.add_postconf_script(
# but instead they are copied as files. And this behavior breaks our tests. python3.find_python().path(),
src = meson.current_source_dir() + '/' + 'sysroots' join_paths(meson.source_root(), 'tests', 'generate-sysroots.py'),
# Note that the `-a` option is Linux specific join_paths(meson.source_root(), 'tests', 'sysroots'),
meson.add_install_script('sh', '-c', 'cp -a "$1" "${DESTDIR}/${MESON_INSTALL_PREFIX}/$2"', 'sh', src, tests_dir) )
meson.add_install_script(
python3.find_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. # These are all the same: they just exit 0.
foreach helper : [ foreach helper : [
......
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/"
whatever
libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
libvdpau_radeonsi.so.1.0.0
\ No newline at end of file
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/"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment