File: run-unit-test

package info (click to toggle)
libatomic-queue 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,336 kB
  • sloc: cpp: 1,704; javascript: 368; makefile: 126; ansic: 91; python: 82; sh: 60
file content (20 lines) | stat: -rw-r--r-- 583 bytes parent folder | download
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