summaryrefslogtreecommitdiff
path: root/Debian
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2010-07-02 05:11:24 +0300
committerJoey Hess <joey@kitenet.net>2011-08-05 14:32:14 -0400
commit0f5a8c3b6f2c0687b55468edc0f26bf2a4df95e9 (patch)
tree35b563248a78ca3fe1cb8290c4a8ff33d75da5e8 /Debian
parent99647dd515f97cfc50fa3321b0a38c553746e244 (diff)
Add support for running tests in parallel to the cmake build system.
Pass appropriate -jN option to ctest (via ARGS variable in the Makefile) to enable support for running tests in parallel. Similarly to makefile build system, ctest -j1 mode is enforced even when parallel mode in debhelper is not explicitly enabled. Unlike make, CTest does not have "unlimited parallel" setting (-j implies -j1). So in order to simulate unlimited parallel, allow to fork a huge number of threads instead.
Diffstat (limited to 'Debian')
-rw-r--r--Debian/Debhelper/Buildsystem/cmake.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm
index 9e40cb72..cddd4b49 100644
--- a/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/Debian/Debhelper/Buildsystem/cmake.pm
@@ -58,8 +58,12 @@ sub configure {
sub test {
my $this=shift;
+ # Unlike make, CTest does not have "unlimited parallel" setting (-j implies
+ # -j1). So in order to simulate unlimited parallel, allow to fork a huge
+ # number of threads instead.
+ my $parallel = ($this->get_parallel() > 0) ? $this->get_parallel() : 999;
$ENV{CTEST_OUTPUT_ON_FAILURE} = 1;
- return $this->SUPER::test(@_);
+ return $this->SUPER::test(@_, "ARGS+=-j$parallel");
}
1