1 |
commit: ef6917fd19d9002b321667b6e4535bf22e26e34b |
2 |
Author: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 15 17:12:31 2020 +0000 |
4 |
Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 15 17:45:36 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef6917fd |
7 |
|
8 |
dev-libs/unittest++: fix tests with clang |
9 |
|
10 |
Closes: https://bugs.gentoo.org/737206 |
11 |
Package-Manager: Portage-3.0.2, Repoman-2.3.23 |
12 |
Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org> |
13 |
|
14 |
.../unittest++-2.0.0-fix-tests-with-clang.patch | 27 ++++++++++++++++++++++ |
15 |
dev-libs/unittest++/unittest++-2.0.0.ebuild | 6 +++-- |
16 |
2 files changed, 31 insertions(+), 2 deletions(-) |
17 |
|
18 |
diff --git a/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch b/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..201ff10de5a |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/unittest++/files/unittest++-2.0.0-fix-tests-with-clang.patch |
23 |
@@ -0,0 +1,27 @@ |
24 |
+commit 2423fcac7668aa9c331a2dcf024c3ca06742942d |
25 |
+Author: Dan Huantes <daniel.f.huantes@××××.com> |
26 |
+Date: Thu Aug 15 08:26:41 2019 -0500 |
27 |
+ |
28 |
+ CrasingTestsAreReportedAsFailures no longer core dumps on Clang Release |
29 |
+ |
30 |
+ Found that Crashing tests at some point in Clang |
31 |
+ history were actually caught but testing on |
32 |
+ Clang 6.0 and Clang 7.0 this is not the case. |
33 |
+ So added Clang to the list of compilers that |
34 |
+ don't run this tests. Noted that several |
35 |
+ other Pull Requests were failing for the same |
36 |
+ reason. |
37 |
+ |
38 |
+diff --git a/tests/TestTest.cpp b/tests/TestTest.cpp |
39 |
+index 5a4e1ca..0db0650 100644 |
40 |
+--- a/tests/TestTest.cpp |
41 |
++++ b/tests/TestTest.cpp |
42 |
+@@ -72,7 +72,7 @@ namespace { |
43 |
+ CHECK_EQUAL(1, results.GetFailureCount()); |
44 |
+ } |
45 |
+ |
46 |
+-#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32) |
47 |
++#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32) && !defined(__clang__) |
48 |
+ // Skip this test in debug because some debuggers don't like it. |
49 |
+ #if defined(NDEBUG) |
50 |
+ TEST(CrashingTestsAreReportedAsFailures) |
51 |
|
52 |
diff --git a/dev-libs/unittest++/unittest++-2.0.0.ebuild b/dev-libs/unittest++/unittest++-2.0.0.ebuild |
53 |
index af6ca161249..88339de1228 100644 |
54 |
--- a/dev-libs/unittest++/unittest++-2.0.0.ebuild |
55 |
+++ b/dev-libs/unittest++/unittest++-2.0.0.ebuild |
56 |
@@ -1,4 +1,4 @@ |
57 |
-# Copyright 1999-2019 Gentoo Authors |
58 |
+# Copyright 1999-2020 Gentoo Authors |
59 |
# Distributed under the terms of the GNU General Public License v2 |
60 |
|
61 |
EAPI=6 |
62 |
@@ -11,6 +11,7 @@ MY_P="${MY_PN}-${PV}" |
63 |
DESCRIPTION="A lightweight unit testing framework for C++" |
64 |
HOMEPAGE="https://unittest-cpp.github.io/" |
65 |
SRC_URI="https://github.com/${MY_PN}/${MY_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
66 |
+S="${WORKDIR}/${MY_P}" |
67 |
|
68 |
LICENSE="MIT" |
69 |
SLOT="0" |
70 |
@@ -18,7 +19,8 @@ KEYWORDS="amd64 x86" |
71 |
IUSE="test" |
72 |
RESTRICT="!test? ( test )" |
73 |
|
74 |
-S="${WORKDIR}/${MY_P}" |
75 |
+# https://github.com/unittest-cpp/unittest-cpp/commit/2423fcac7668aa9c331a2dcf024c3ca06742942d |
76 |
+PATCHES=( "${FILESDIR}/${P}-fix-tests-with-clang.patch" ) |
77 |
|
78 |
src_prepare() { |
79 |
cmake-utils_src_prepare |