Debian Codegraph @

debian/tests/run-cpp-testsuite

raw
1 #!/bin/sh
2 set -e
3
4 if [ `dpkg-architecture -qDEB_HOST_ARCH_BITS` = 32 ]
5 then
6 echo "Skipping C++ test suite on 32 bit architectures"
7 exit 77
8 fi
9
10 cp -r test "$AUTOPKGTEST_TMP"
11
12 cd "$AUTOPKGTEST_TMP"
13 sed -i -e '1 s/^cmake_minimum/#&/' -e '/target_link/ s/\${PROJECT_NAME}/MANIF::manif/' test/CMakeLists.txt
14 cat > CMakeLists.txt << EOF
15 cmake_minimum_required(VERSION 3.14)
16 project(manif-autopkgtest)
17 find_package(manif REQUIRED)
18
19 enable_testing()
20 add_subdirectory(test)
21 EOF
22
23 echo ""
24 echo "---------------- Testing C++ implementation ----------------"
25
26 mkdir _build
27 cd _build
28
29 cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
30 cmake --build . --verbose -j`nproc || echo 1`
31 ctest --output-on-failure
32