This is an automated email from the git hooks/post-receive script. afif-guest pushed a commit to branch master in repository pbbam.
commit aa8a991f91fc7a07fd948646ae75f43b47949e4a Author: Afif Elghraoui <[email protected]> Date: Mon Sep 7 23:57:33 2015 -0700 Attempt to build test suite sources --- debian/control | 1 + debian/patches/dont-try-building-gtest | 12 + debian/patches/gcc5 | 515 +++++++++++++++++++++++++++++++++ debian/patches/series | 2 + debian/rules | 5 +- 5 files changed, 534 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index e750bd8..db366c0 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9), cmake, # swig3.0, doxygen, + libgtest-dev, libboost-dev (>= 1.54), zlib1g-dev, libssl-dev, diff --git a/debian/patches/dont-try-building-gtest b/debian/patches/dont-try-building-gtest new file mode 100644 index 0000000..b859a7d --- /dev/null +++ b/debian/patches/dont-try-building-gtest @@ -0,0 +1,12 @@ +--- pbbam.orig/CMakeLists.txt ++++ pbbam/CMakeLists.txt +@@ -124,9 +124,5 @@ + add_subdirectory(docs) + endif() + if(PacBioBAM_build_tests) +- if (NOT GTEST_SRC_DIR) +- set(GTEST_SRC_DIR ../gtest) +- endif() +- add_subdirectory(${GTEST_SRC_DIR} external/gtest/build) + add_subdirectory(tests) + endif() diff --git a/debian/patches/gcc5 b/debian/patches/gcc5 new file mode 100644 index 0000000..e577299 --- /dev/null +++ b/debian/patches/gcc5 @@ -0,0 +1,515 @@ +Description: Improve ability of test suite sources to build + The test suite relies on a hackish CPP trick to redefine "private" as + "public". Unfortunately, this fails when including headers from the standard + library or other external sources. These patches undo the trick before + including external headers. Again unfortunately, this isn't sufficient to + allow the test suite to build because the pbbam headers themselves also + include external headers. It looks like some refactoring is in order. +Author: Afif Elghraoui <[email protected]> +Forwarded: no +Last-Update: 2015-09-07 +--- pbbam.orig/tests/src/test_Accuracy.cpp ++++ pbbam/tests/src/test_Accuracy.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/Accuracy.h> ++#undef private ++#include <gtest/gtest.h> ++ + using namespace PacBio; + using namespace PacBio::BAM; + using namespace std; +--- pbbam.orig/tests/src/test_AlignmentPrinter.cpp ++++ pbbam/tests/src/test_AlignmentPrinter.cpp +@@ -40,7 +40,6 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + + #include "pbbam/AlignmentPrinter.h" + #include "pbbam/BamFile.h" +@@ -48,6 +47,10 @@ + #include "pbbam/EntireFileQuery.h" + #include "pbbam/IndexedFastaReader.h" + ++#undef private ++ ++#include <gtest/gtest.h> ++ + #include <iostream> + #include <sstream> + #include <string> +--- pbbam.orig/tests/src/test_BamFile.cpp ++++ pbbam/tests/src/test_BamFile.cpp +@@ -40,8 +40,11 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/BamFile.h> ++ ++#undef private ++ ++#include <gtest/gtest.h> + #include <stdexcept> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_BamHeader.cpp ++++ pbbam/tests/src/test_BamHeader.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + ++#include <pbbam/BamHeader.h> ++#undef private ++ + #include <gtest/gtest.h> + #include <htslib/sam.h> +-#include <pbbam/BamHeader.h> + #include <iostream> + #include <string> + #include <utility> +--- pbbam.orig/tests/src/test_BamRecord.cpp ++++ pbbam/tests/src/test_BamRecord.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecord.h> + #include <pbbam/BamTagCodec.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_BamRecordBuilder.cpp ++++ pbbam/tests/src/test_BamRecordBuilder.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecordBuilder.h> + #include <pbbam/BamTagCodec.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <chrono> + #include <string> + using namespace PacBio; +--- pbbam.orig/tests/src/test_BamRecordClipping.cpp ++++ pbbam/tests/src/test_BamRecordClipping.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecord.h> + #include <pbbam/BamTagCodec.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <chrono> + #include <string> + using namespace PacBio; +--- pbbam.orig/tests/src/test_BamRecordImplCore.cpp ++++ pbbam/tests/src/test_BamRecordImplCore.cpp +@@ -39,11 +39,13 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecordImpl.h> + #include <pbbam/BamTagCodec.h> + #include <pbbam/Tag.h> + #include <pbbam/TagCollection.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <algorithm> + #include <iostream> + #include <iterator> +--- pbbam.orig/tests/src/test_BamRecordImplTags.cpp ++++ pbbam/tests/src/test_BamRecordImplTags.cpp +@@ -39,8 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecordImpl.h> ++#undef private ++ ++#include <gtest/gtest.h> ++ + using namespace PacBio; + using namespace PacBio::BAM; + using namespace std; +--- pbbam.orig/tests/src/test_BamRecordImplVariableData.cpp ++++ pbbam/tests/src/test_BamRecordImplVariableData.cpp +@@ -39,12 +39,14 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecordImpl.h> + #include <pbbam/BamTagCodec.h> + #include <pbbam/SamTagCodec.h> + #include <pbbam/Tag.h> + #include <pbbam/TagCollection.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <algorithm> + #include <iostream> + #include <iterator> +--- pbbam.orig/tests/src/test_BamRecordMapping.cpp ++++ pbbam/tests/src/test_BamRecordMapping.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/BamRecord.h> + #include <pbbam/BamTagCodec.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <chrono> + #include <string> + using namespace PacBio; +--- pbbam.orig/tests/src/test_BamWriter.cpp ++++ pbbam/tests/src/test_BamWriter.cpp +@@ -40,12 +40,14 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> +-#include <htslib/sam.h> + #include <pbbam/BamHeader.h> + #include <pbbam/BamRecord.h> + #include <pbbam/BamWriter.h> + #include <pbbam/EntireFileQuery.h> ++#undef private ++ ++#include <gtest/gtest.h> ++#include <htslib/sam.h> + #include <chrono> + #include <iostream> + #include <string> +--- pbbam.orig/tests/src/test_Cigar.cpp ++++ pbbam/tests/src/test_Cigar.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/Cigar.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_DataSetCore.cpp ++++ pbbam/tests/src/test_DataSetCore.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/DataSet.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_DataSetIO.cpp ++++ pbbam/tests/src/test_DataSetIO.cpp +@@ -40,9 +40,11 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/DataSet.h> + #include <pbbam/internal/DataSetElement.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <stdexcept> + #include <sstream> + #include <string> +--- pbbam.orig/tests/src/test_DataSetMetadata.cpp ++++ pbbam/tests/src/test_DataSetMetadata.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/dataset/DataSet.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_EndToEnd.cpp ++++ pbbam/tests/src/test_EndToEnd.cpp +@@ -41,11 +41,14 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> +-#include <htslib/sam.h> + #include <pbbam/BamFile.h> + #include <pbbam/BamWriter.h> + #include <pbbam/EntireFileQuery.h> ++#undef private ++#undef protected ++ ++#include <gtest/gtest.h> ++#include <htslib/sam.h> + #include <iostream> + #include <memory> + #include <string> +--- pbbam.orig/tests/src/test_EntireFileQuery.cpp ++++ pbbam/tests/src/test_EntireFileQuery.cpp +@@ -40,8 +40,10 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/EntireFileQuery.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_Frames.cpp ++++ pbbam/tests/src/test_Frames.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/Frames.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + #include <vector> + using namespace PacBio; +--- pbbam.orig/tests/src/test_GenomicIntervalQuery.cpp ++++ pbbam/tests/src/test_GenomicIntervalQuery.cpp +@@ -40,8 +40,10 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/GenomicIntervalQuery.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <iostream> + #include <string> + using namespace PacBio; +--- pbbam.orig/tests/src/test_GroupQuery.cpp ++++ pbbam/tests/src/test_GroupQuery.cpp +@@ -40,9 +40,11 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/ZmwGroupQuery.h> + #include <pbbam/GroupQuery.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_IndexedFastaReader.cpp ++++ pbbam/tests/src/test_IndexedFastaReader.cpp +@@ -44,6 +44,8 @@ + #include "pbbam/BamRecord.h" + #include "pbbam/BamFile.h" + #include "pbbam/EntireFileQuery.h" ++#undef private ++ + #include <gtest/gtest.h> + #include <iostream> + #include <sstream> +--- pbbam.orig/tests/src/test_Intervals.cpp ++++ pbbam/tests/src/test_Intervals.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/GenomicInterval.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_PacBioIndex.cpp ++++ pbbam/tests/src/test_PacBioIndex.cpp +@@ -40,7 +40,6 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/BamFile.h> + #include <pbbam/BamWriter.h> + #include <pbbam/EntireFileQuery.h> +@@ -48,6 +47,9 @@ + #include <pbbam/PbiIndex.h> + #include <pbbam/PbiRawData.h> + #include <pbbam/internal/PbiIndex_p.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + #include <cstdio> + #include <cstdlib> +--- pbbam.orig/tests/src/test_PolymeraseStitching.cpp ++++ pbbam/tests/src/test_PolymeraseStitching.cpp +@@ -39,18 +39,19 @@ + #define private public + #endif + +-#include <iostream> +-#include <map> +-#include <string> +- +-#include <gtest/gtest.h> +- + #include "pbbam/virtual/VirtualPolymeraseReader.h" + #include "pbbam/BamFile.h" + #include "pbbam/BamRecord.h" + #include "pbbam/EntireFileQuery.h" + #include "pbbam/Frames.h" + #include "TestData.h" ++#undef private ++ ++#include <iostream> ++#include <map> ++#include <string> ++ ++#include <gtest/gtest.h> + + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_QualityValues.cpp ++++ pbbam/tests/src/test_QualityValues.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/QualityValues.h> ++#undef private ++ ++#include <gtest/gtest.h> + using namespace PacBio; + using namespace PacBio::BAM; + using namespace std; +--- pbbam.orig/tests/src/test_ReadGroupInfo.cpp ++++ pbbam/tests/src/test_ReadGroupInfo.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/ReadGroupInfo.h> ++#undef private ++ ++#include <gtest/gtest.h> + using namespace PacBio::BAM; + + +--- pbbam.orig/tests/src/test_SequenceUtils.cpp ++++ pbbam/tests/src/test_SequenceUtils.cpp +@@ -39,9 +39,11 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/../../src/SequenceUtils.h> + #include <pbbam/../../src/StringUtils.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + #include <vector> + +--- pbbam.orig/tests/src/test_Tags.cpp ++++ pbbam/tests/src/test_Tags.cpp +@@ -39,11 +39,13 @@ + #define private public + #endif + +-#include <boost/type_traits/is_convertible.hpp> +-#include <gtest/gtest.h> + #include <pbbam/BamTagCodec.h> + #include <pbbam/TagCollection.h> + #include <pbbam/SamTagCodec.h> ++#undef private ++ ++#include <boost/type_traits/is_convertible.hpp> ++#include <gtest/gtest.h> + #include <algorithm> + #include <iostream> + #include <map> +--- pbbam.orig/tests/src/test_TimeUtils.cpp ++++ pbbam/tests/src/test_TimeUtils.cpp +@@ -39,8 +39,10 @@ + #define private public + #endif + +-#include <gtest/gtest.h> + #include <pbbam/../../src/TimeUtils.h> ++#undef private ++ ++#include <gtest/gtest.h> + + using namespace PacBio; + using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_UnmappedReadsQuery.cpp ++++ pbbam/tests/src/test_UnmappedReadsQuery.cpp +@@ -40,10 +40,11 @@ + //#endif + + //#include "TestData.h" +-//#include <gtest/gtest.h> + //#include <pbbam/EntireFileQuery.h> +- + //#include <pbbam/UnmappedReadsQuery.h> ++//#undef private ++ ++//#include <gtest/gtest.h> + //#include <string> + //using namespace PacBio; + //using namespace PacBio::BAM; +--- pbbam.orig/tests/src/test_ZmwQuery.cpp ++++ pbbam/tests/src/test_ZmwQuery.cpp +@@ -40,8 +40,10 @@ + #endif + + #include "TestData.h" +-#include <gtest/gtest.h> + #include <pbbam/ZmwQuery.h> ++#undef private ++ ++#include <gtest/gtest.h> + #include <string> + using namespace PacBio; + using namespace PacBio::BAM; diff --git a/debian/patches/series b/debian/patches/series index f3a7560..7d5b54a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,4 @@ set-samtools-path ssl-md5 +dont-try-building-gtest +gcc5 diff --git a/debian/rules b/debian/rules index cdf38fc..54a306a 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ include /usr/share/dpkg/default.mk override_dh_auto_configure: dh_auto_configure -- \ -DPacBioBAM_build_shared=ON \ - -DPacBioBAM_build_tests=OFF \ + -DPacBioBAM_build_tests=ON \ -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \ -DHTSLIB_INCLUDE_DIRS=/usr/include \ -DHTSLIB_LIBRARIES=/usr/lib \ @@ -19,5 +19,8 @@ override_dh_auto_configure: # -DPacBioBAM_wrap_python=ON \ # -DPacBioBAM_wrap_r=ON +override_dh_auto_test: + cd build && $(MAKE) test + override_dh_installchangelogs: dh_installchangelogs CHANGELOG.md -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pbbam.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
