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
|