1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#!/bin/bash
set -e
# Copy tests to temporary directory
cp src/tests.cc "${AUTOPKGTEST_TMP}"/
cd ${AUTOPKGTEST_TMP}
# Create meson file
cat > $AUTOPKGTEST_TMP/meson.build << EOL
project('atomic_queue_tests', 'cpp')
atomic_queue_dep = dependency('atomic_queue')
boost_dep = dependency('boost', modules: ['unit_test_framework'])
atomic_queue_tests_exe = executable('atomic_queue_tests', 'tests.cc', dependencies: [atomic_queue_dep, boost_dep])
test('atomic_queue_tests', atomic_queue_tests_exe)
EOL
# Compile and run test
meson setup build
meson compile -C build
meson test -C build
|