Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/catch/files/
Date: Mon, 04 Mar 2019 03:14:27
Message-Id: 1551669153.60b7bb8f79cd906d25dcd34b3eb96c92b97052ff.bman@gentoo
1 commit: 60b7bb8f79cd906d25dcd34b3eb96c92b97052ff
2 Author: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
3 AuthorDate: Fri Mar 1 17:43:36 2019 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 4 03:12:33 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=60b7bb8f
7
8 dev-cpp/catch: remove unused patches
9
10 Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
11 Closes: https://github.com/gentoo/gentoo/pull/11198
12 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
13
14 .../catch/files/catch-2.2.2-python-automagic.patch | 25 ------------
15 dev-cpp/catch/files/catch-2.2.2-test-python3.patch | 44 ----------------------
16 2 files changed, 69 deletions(-)
17
18 diff --git a/dev-cpp/catch/files/catch-2.2.2-python-automagic.patch b/dev-cpp/catch/files/catch-2.2.2-python-automagic.patch
19 deleted file mode 100644
20 index ecc99905d7f..00000000000
21 --- a/dev-cpp/catch/files/catch-2.2.2-python-automagic.patch
22 +++ /dev/null
23 @@ -1,25 +0,0 @@
24 ---- a/CMakeLists.txt
25 -+++ b/CMakeLists.txt
26 -@@ -308,6 +308,9 @@
27 -
28 - include(CTest)
29 -
30 -+# Approval tests require python 2.7 or 3
31 -+find_package(PythonInterp)
32 -+
33 - if (BUILD_TESTING AND NOT_SUBPROJECT)
34 - add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${REPORTER_SOURCES} ${SURROGATE_SOURCES} ${HEADERS})
35 - target_include_directories(SelfTest PRIVATE ${HEADER_DIR})
36 -@@ -384,7 +387,11 @@
37 - set_tests_properties(NoTest PROPERTIES PASS_REGULAR_EXPRESSION "No test cases matched")
38 -
39 - # AppVeyor has a Python 2.7 in path, but doesn't have .py files as autorunnable
40 -- add_test(NAME ApprovalTests COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
41 -+ if(NOT ${PYTHONINTERP_FOUND})
42 -+ message(FATAL_ERROR "Python not found, but required for running tests!")
43 -+ endif()
44 -+
45 -+ add_test(NAME ApprovalTests COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/approvalTests.py $<TARGET_FILE:SelfTest>)
46 - set_tests_properties(ApprovalTests PROPERTIES FAIL_REGULAR_EXPRESSION "Results differed")
47 -
48 - if (CATCH_USE_VALGRIND)
49
50 diff --git a/dev-cpp/catch/files/catch-2.2.2-test-python3.patch b/dev-cpp/catch/files/catch-2.2.2-test-python3.patch
51 deleted file mode 100644
52 index 0712f157707..00000000000
53 --- a/dev-cpp/catch/files/catch-2.2.2-test-python3.patch
54 +++ /dev/null
55 @@ -1,44 +0,0 @@
56 -From dc6b83bec9bdcc149db08711cc9dfd555a8620fa Mon Sep 17 00:00:00 2001
57 -From: Tom Hughes <tom@×××××××.nu>
58 -Date: Fri, 6 Apr 2018 13:59:08 +0100
59 -Subject: [PATCH] Support Python3 in approval tests
60 -
61 ----
62 - scripts/approvalTests.py | 15 +++++++++++----
63 - 1 file changed, 11 insertions(+), 4 deletions(-)
64 -
65 -diff --git a/scripts/approvalTests.py b/scripts/approvalTests.py
66 -index a2ab5d5a2..16cc7b7d2 100755
67 ---- a/scripts/approvalTests.py
68 -+++ b/scripts/approvalTests.py
69 -@@ -72,10 +72,17 @@
70 -
71 - overallResult = 0
72 -
73 -+def openFile(file, mode):
74 -+ try:
75 -+ return open(file, mode, encoding='utf-8', errors='surrogateescape')
76 -+ except TypeError:
77 -+ import io
78 -+ return io.open(file, mode, encoding='utf-8', errors='surrogateescape')
79 -+
80 - def diffFiles(fileA, fileB):
81 -- with open(fileA, 'r') as file:
82 -+ with openFile(fileA, 'r') as file:
83 - aLines = [line.rstrip() for line in file.readlines()]
84 -- with open(fileB, 'r') as file:
85 -+ with openFile(fileB, 'r') as file:
86 - bLines = [line.rstrip() for line in file.readlines()]
87 -
88 - shortenedFilenameA = fileA.rsplit(os.sep, 1)[-1]
89 -@@ -139,8 +146,8 @@ def approve(baseName, args):
90 - subprocess.call(args, stdout=f, stderr=f)
91 - f.close()
92 -
93 -- rawFile = open(rawResultsPath, 'r')
94 -- filteredFile = open(filteredResultsPath, 'w')
95 -+ rawFile = openFile(rawResultsPath, 'r')
96 -+ filteredFile = openFile(filteredResultsPath, 'w')
97 - for line in rawFile:
98 - filteredFile.write(filterLine(line).rstrip() + "\n")
99 - filteredFile.close()