pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

clang-netbsd: Partial fix for tests execution



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Mon Jun 5 14:54:42 2017 +0200
Changeset:	22566e389f2cb9e10e796e0be72e17a6d17eaa76

Modified Files:
	clang-netbsd/Makefile.common
	clang-netbsd/distinfo
Added Files:
	clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
	clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
	clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
	clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp

Log Message:
clang-netbsd: Partial fix for tests execution

Sponsored by <The NetBSD Foundation>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=22566e389f2cb9e10e796e0be72e17a6d17eaa76

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 clang-netbsd/Makefile.common                           | 18 +++---------------
 clang-netbsd/distinfo                                  |  7 +++++++
 .../patch-unittests_Basic_MemoryBufferCacheTest.cpp    | 12 ++++++++++++
 .../patches/patch-unittests_Format_FormatTest.cpp      | 13 +++++++++++++
 .../patch-unittests_Format_FormatTestComments.cpp      | 13 +++++++++++++
 .../patches/patch-unittests_Format_FormatTestObjC.cpp  | 13 +++++++++++++
 .../patch-unittests_Format_FormatTestSelective.cpp     | 13 +++++++++++++
 .../patch-unittests_Format_SortImportsTestJS.cpp       | 13 +++++++++++++
 .../patch-unittests_Rewrite_RewriteBufferTest.cpp      | 12 ++++++++++++
 9 files changed, 99 insertions(+), 15 deletions(-)

diffs:
diff --git a/clang-netbsd/Makefile.common b/clang-netbsd/Makefile.common
index 9d1b83ba4b..91f865092d 100644
--- a/clang-netbsd/Makefile.common
+++ b/clang-netbsd/Makefile.common
@@ -101,29 +101,17 @@ PLIST.notdylib=	yes
 .endif
 PLIST_SUBST+=	SOEXT=${SOEXT}
 
-PKG_OPTIONS_VAR=	PKG_OPTIONS.clang
-PKG_SUPPORTED_OPTIONS=	tests
-
-.include "../../mk/bsd.options.mk"
-
-.if !empty(PKG_OPTIONS:Mtests)
-CMAKE_ARGS+=		-DLLVM_INCLUDE_TESTS=ON
-CMAKE_ARGS+=		-DCLANG_INCLUDE_TESTS=ON
-TEST_TARGET=		clang-test
+TEST_TARGET=		check-clang
 TEST_ENV+=		LD_LIBRARY_PATH=${WRKDIR}/build/lib
-.include "../../devel/googletest/buildlink3.mk"
-.else
-CMAKE_ARGS+=		-DLLVM_INCLUDE_TESTS=OFF
-CMAKE_ARGS+=		-DCLANG_INCLUDE_TESTS=OFF
-.endif
 
 post-extract:
 	${RUN} mkdir -p ${WRKDIR}/build
 
-.include "../../textproc/libxml2/buildlink3.mk"
 .include "../../wip/mk/svn-package.mk"
+.include "../../devel/googletest/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../lang/python/tool.mk"
 DEPENDS+=	llvm-${PKGVERSION_NOREV}{,nb*}:../../wip/llvm-netbsd
 .include "../../wip/llvm-netbsd/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff --git a/clang-netbsd/distinfo b/clang-netbsd/distinfo
index 09122e70ee..b52bb05eab 100644
--- a/clang-netbsd/distinfo
+++ b/clang-netbsd/distinfo
@@ -15,3 +15,10 @@ Size (llvm-3.6.2.src.tar.xz) = 12802380 bytes
 SHA1 (patch-lib_Driver_ToolChains_NetBSD.cpp) = 83982b7fee74a199bcf99e1dbbe5b92a17514cd3
 SHA1 (patch-test_Driver_netbsd.c) = 03d935c4362391fbaee264e02a9c02f3233c6576
 SHA1 (patch-tools_clang-format_CMakeLists.txt) = f119d2a94cbfb8c00a285d1aa7789ed26f8309cf
+SHA1 (patch-unittests_Basic_MemoryBufferCacheTest.cpp) = ec0b3f1348d45c45285e97a707223f34701d0df0
+SHA1 (patch-unittests_Format_FormatTest.cpp) = 9b01224cdc86b096701b7490a31149ed51c6b393
+SHA1 (patch-unittests_Format_FormatTestComments.cpp) = a77b88c5d7e7347d2a6fa5cfbdda9ecfb9998f83
+SHA1 (patch-unittests_Format_FormatTestObjC.cpp) = 7fbe4fa136a6e90d5176bf0fbfddeb491812f919
+SHA1 (patch-unittests_Format_FormatTestSelective.cpp) = 9eb96791ce196a9b036a55c45f1bc42408a2dc79
+SHA1 (patch-unittests_Format_SortImportsTestJS.cpp) = dca1c14ecfe894876fccee436809bace49543321
+SHA1 (patch-unittests_Rewrite_RewriteBufferTest.cpp) = 3199253fea594f7cfd13e4c043f387bffd8c7d06
diff --git a/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp b/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
new file mode 100644
index 0000000000..1e8ad09d70
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Basic_MemoryBufferCacheTest.cpp
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- unittests/Basic/MemoryBufferCacheTest.cpp.orig	2017-03-22 16:58:38.000000000 +0000
++++ unittests/Basic/MemoryBufferCacheTest.cpp
+@@ -9,6 +9,7 @@
+ 
+ #include "clang/Basic/MemoryBufferCache.h"
+ #include "llvm/Support/MemoryBuffer.h"
++#include "llvm/Support/raw_ostream.h"
+ #include "gtest/gtest.h"
+ 
+ using namespace llvm;
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
new file mode 100644
index 0000000000..269d8a51aa
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Format_FormatTest.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- unittests/Format/FormatTest.cpp.orig	2017-05-29 10:06:52.000000000 +0000
++++ unittests/Format/FormatTest.cpp
+@@ -48,7 +48,7 @@ protected:
+     if (CheckComplete != SC_DoNotCheck) {
+       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
+       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
+-          << Code << "\n\n";
++          << Code.str() << "\n\n";
+     }
+     ReplacementCount = Replaces.size();
+     auto Result = applyAllReplacements(Code, Replaces);
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
new file mode 100644
index 0000000000..c99d984050
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Format_FormatTestComments.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- unittests/Format/FormatTestComments.cpp.orig	2017-05-29 10:06:52.000000000 +0000
++++ unittests/Format/FormatTestComments.cpp
+@@ -47,7 +47,7 @@ protected:
+     if (CheckComplete != SC_DoNotCheck) {
+       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
+       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
+-          << Code << "\n\n";
++          << Code.str() << "\n\n";
+     }
+     ReplacementCount = Replaces.size();
+     auto Result = applyAllReplacements(Code, Replaces);
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
new file mode 100644
index 0000000000..a97c99cad8
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Format_FormatTestObjC.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- unittests/Format/FormatTestObjC.cpp.orig	2017-05-29 10:06:52.000000000 +0000
++++ unittests/Format/FormatTestObjC.cpp
+@@ -49,7 +49,7 @@ protected:
+     if (CheckComplete != SC_DoNotCheck) {
+       bool ExpectedCompleteFormat = CheckComplete == SC_ExpectComplete;
+       EXPECT_EQ(ExpectedCompleteFormat, Status.FormatComplete)
+-          << Code << "\n\n";
++          << Code.str() << "\n\n";
+     }
+     auto Result = applyAllReplacements(Code, Replaces);
+     EXPECT_TRUE(static_cast<bool>(Result));
diff --git a/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp b/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
new file mode 100644
index 0000000000..e2fa5db2ee
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Format_FormatTestSelective.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- unittests/Format/FormatTestSelective.cpp.orig	2017-05-29 10:06:52.000000000 +0000
++++ unittests/Format/FormatTestSelective.cpp
+@@ -27,7 +27,7 @@ protected:
+     FormattingAttemptStatus Status;
+     tooling::Replacements Replaces =
+         reformat(Style, Code, Ranges, "<stdin>", &Status);
+-    EXPECT_TRUE(Status.FormatComplete) << Code << "\n\n";
++    EXPECT_TRUE(Status.FormatComplete) << Code.str() << "\n\n";
+     auto Result = applyAllReplacements(Code, Replaces);
+     EXPECT_TRUE(static_cast<bool>(Result));
+     DEBUG(llvm::errs() << "\n" << *Result << "\n\n");
diff --git a/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp b/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
new file mode 100644
index 0000000000..c950b21f7d
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Format_SortImportsTestJS.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- unittests/Format/SortImportsTestJS.cpp.orig	2016-12-17 00:12:47.000000000 +0000
++++ unittests/Format/SortImportsTestJS.cpp
+@@ -38,7 +38,7 @@ protected:
+                   unsigned Offset = 0, unsigned Length = 0) {
+     std::string Result = sort(Code, Offset, Length);
+     EXPECT_EQ(Expected.str(), Result) << "Expected:\n"
+-                                      << Expected << "\nActual:\n"
++                                      << Expected.str() << "\nActual:\n"
+                                       << Result;
+   }
+ 
diff --git a/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp b/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp
new file mode 100644
index 0000000000..0e470e87f6
--- /dev/null
+++ b/clang-netbsd/patches/patch-unittests_Rewrite_RewriteBufferTest.cpp
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- unittests/Rewrite/RewriteBufferTest.cpp.orig	2016-12-17 00:12:45.000000000 +0000
++++ unittests/Rewrite/RewriteBufferTest.cpp
+@@ -8,6 +8,7 @@
+ //===----------------------------------------------------------------------===//
+ 
+ #include "clang/Rewrite/Core/RewriteBuffer.h"
++#include "llvm/Support/raw_ostream.h"
+ #include "gtest/gtest.h"
+ 
+ using namespace llvm;


Home | Main Index | Thread Index | Old Index