Hello,

As promised in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=555805#45
updated patch is attached.

-- 
Modestas Vainius <[email protected]>
From: Modestas Vainius <[email protected]>
Subject: [PATCH] Enable verbose ctest output on test failure

When test fails, enable verbose ctest output. This allows to
get more details on a test failure from the build logs.

Auto-select cmake in further steps only if cmake was run in configure step.
CMake writes CMakeCache.txt to build directory when it is run. Depend on the
presence of this file for auto-selection in build, test, install and clean
steps.

Signed-off-by: Modestas Vainius <[email protected]>

---
 Debian/Debhelper/Buildsystem/cmake.pm |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/Debian/Debhelper/Buildsystem/cmake.pm b/Debian/Debhelper/Buildsystem/cmake.pm
index 21a077e..03e6ade 100644
--- a/Debian/Debhelper/Buildsystem/cmake.pm
+++ b/Debian/Debhelper/Buildsystem/cmake.pm
@@ -17,7 +17,10 @@ sub check_auto_buildable {
 	my $this=shift;
 	my ($step)=...@_;
 	my $ret = -e $this->get_sourcepath("CMakeLists.txt");
-	$ret &&= $this->SUPER::check_auto_buildable(@_) if $step ne "configure";
+	if ($step ne "configure") {
+		$ret &&= -e $this->get_buildpath("CMakeCache.txt") &&
+		         $this->SUPER::check_auto_buildable(@_);
+	}
 	return $ret;
 }
 
@@ -40,4 +43,11 @@ sub configure {
 	$this->doit_in_builddir("cmake", $this->get_source_rel2builddir(), @flags, @_);
 }
 
+sub test {
+	my $this=shift;
+
+	$ENV{CTEST_OUTPUT_ON_FAILURE} = 1;
+	return $this->test(@_);
+}
+
 1
-- 
tg: (07e276d..) patch/ctest_verbose (depends on: master)

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to