1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#! /bin/bash
set -x
set -e
QT_VERSION="$1"
cp -r -t $AUTOPKGTEST_TMP src/tests meson_options.txt
cd $AUTOPKGTEST_TMP
cat > meson.build <<EOF
project('autopkgtest', ['c', 'cpp'],
default_options : ['cpp_std=c++17', 'c_std=gnu11'])
qt_dep = dependency(get_option('qt'), modules: 'Core')
termpaint_dep = dependency('termpaint')
if get_option('qt') == 'qt5'
posixsignalmanager_dep = dependency('PosixSignalManager')
tuiwidgets_dep = dependency('TuiWidgets')
else
posixsignalmanager_dep = dependency('PosixSignalManagerQt6')
tuiwidgets_dep = dependency('TuiWidgetsQt6')
endif
catch2_dep = dependency('catch2')
if catch2_dep.version().version_compare('>=3.0')
catch2_dep = [catch2_dep, declare_dependency(compile_args: ['-DCATCH3'])]
endif
tests_as_installed = true
subdir('tests')
EOF
if ! meson _build ; then
cp -r _build/meson-logs $AUTOPKGTEST_ARTIFACTS
exit 1
fi
if ! meson test -C _build ; then
cp -r _build/meson-logs $AUTOPKGTEST_ARTIFACTS
exit 1
fi
cp -r _build/meson-logs $AUTOPKGTEST_ARTIFACTS || true
|