File: run-cpp-testsuite

package info (click to toggle)
manif 0.0.5-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,576 kB
  • sloc: cpp: 11,789; ansic: 8,774; python: 2,158; sh: 24; makefile: 23; xml: 21
file content (32 lines) | stat: -rwxr-xr-x 729 bytes parent folder | download
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
#!/bin/sh
set -e

if [ `dpkg-architecture -qDEB_HOST_ARCH_BITS` = 32 ]
then
	echo "Skipping C++ test suite on 32 bit architectures"
	exit 77
fi

cp -r test "$AUTOPKGTEST_TMP"

cd "$AUTOPKGTEST_TMP"
sed -i -e '1 s/^cmake_minimum/#&/' -e '/target_link/ s/\${PROJECT_NAME}/MANIF::manif/' test/CMakeLists.txt
cat > CMakeLists.txt << EOF
cmake_minimum_required(VERSION 3.14)
project(manif-autopkgtest)
find_package(manif REQUIRED)

enable_testing()
add_subdirectory(test)
EOF

echo ""
echo "---------------- Testing C++ implementation ----------------"

mkdir _build
cd _build

cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
cmake --build . --verbose -j`nproc || echo 1`
ctest --output-on-failure