Skip to content
Commits on Source (3)
......@@ -3,6 +3,11 @@ libthread-pool (1.0.0-3) UNRELEASED; urgency=medium
* Team upload.
* Add missing '-pthread'
* Remove trailing whitespace in debian/copyright
* Standards-Version: 4.3.0; no changes needed
* Update homepage URL.
* Build the included tests and run them
* As an autopkgtest, build the tests against the installed package and run
them.
-- Michael R. Crusoe <michael.crusoe@gmail.com> Fri, 04 Jan 2019 09:44:11 -0800
......
......@@ -7,11 +7,11 @@ Build-Depends: debhelper (>= 11~),
cmake,
d-shlibs,
rename,
libgtest-dev
googletest
Standards-Version: 4.3.0
Vcs-Browser: https://salsa.debian.org/med-team/libthread-pool
Vcs-Git: https://salsa.debian.org/med-team/libthread-pool.git
Homepage: https://github.com/rvaser/libthread-pool
Homepage: https://github.com/rvaser/thread_pool
Package: libthread-pool0
Architecture: any
......
......@@ -8,6 +8,14 @@ export DEB_LDFLAGS_MAINT_APPEND+=-pthread
%:
dh $@
override_dh_auto_configure:
rm -Rf vendor/*
ln -s /usr/src/googletest ./vendor/
dh_auto_configure -- -Dthread_pool_build_tests=ON
override_dh_auto_test:
./obj-*/bin/thread_pool_test
override_dh_install:
dh_install
file-rename 's/_static\.a/.a/' `find debian -name "lib*_static.a"`
......
cmake_minimum_required(VERSION 3.2)
project(thread_pool_test)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic")
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(thread_pool_test thread_pool_test.cpp)
add_subdirectory(/usr/src/googletest .. EXCLUDE_FROM_ALL)
target_link_libraries(thread_pool_test thread_pool gtest_main)
Tests: run-unit-test
Depends: @, googletest
Restrictions: allow-stderr
#!/bin/bash
set -e
pkg=libthread-pool
if [ "$AUTOPKGTEST_TMP" = "" ] ; then
AUTOPKGTEST_TMP=`mktemp -d /tmp/${pkg}-test.XXXXXX`
trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi
cp -a test/* $AUTOPKGTEST_TMP
cp -a debian/tests/CMakeLists.txt $AUTOPKGTEST_TMP
cd $AUTOPKGTEST_TMP
mkdir build
cd build
cmake ..
make
./thread_pool_test