1 |
commit: 9abf52f39073b3945fb8c83ea8f27dc3edcf23a0 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 19 17:22:43 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 19 20:16:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9abf52f3 |
7 |
|
8 |
dev-python/clang-python: Patch completion test failures |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/clang-python/clang-python-7.0.0.ebuild | 6 ++++ |
13 |
.../clang-python/clang-python-7.0.9999.ebuild | 6 ++++ |
14 |
dev-python/clang-python/clang-python-9999.ebuild | 6 ++++ |
15 |
...-python-tests-Update-test_code_completion.patch | 33 ++++++++++++++++++++++ |
16 |
4 files changed, 51 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/clang-python/clang-python-7.0.0.ebuild b/dev-python/clang-python/clang-python-7.0.0.ebuild |
19 |
index 5d6eaf45c6c..6587ca010e1 100644 |
20 |
--- a/dev-python/clang-python/clang-python-7.0.0.ebuild |
21 |
+++ b/dev-python/clang-python/clang-python-7.0.0.ebuild |
22 |
@@ -29,6 +29,12 @@ DEPEND="${RDEPEND}" |
23 |
|
24 |
S=${WORKDIR}/${MY_P}/bindings/python |
25 |
|
26 |
+PATCHES=( |
27 |
+ # update completion test results due to completion changes |
28 |
+ # https://reviews.llvm.org/D50171 |
29 |
+ "${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch |
30 |
+) |
31 |
+ |
32 |
src_unpack() { |
33 |
einfo "Unpacking parts of ${MY_P}.tar.xz ..." |
34 |
tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/bindings/python" || die |
35 |
|
36 |
diff --git a/dev-python/clang-python/clang-python-7.0.9999.ebuild b/dev-python/clang-python/clang-python-7.0.9999.ebuild |
37 |
index d0d8cf54084..56917d10ff1 100644 |
38 |
--- a/dev-python/clang-python/clang-python-7.0.9999.ebuild |
39 |
+++ b/dev-python/clang-python/clang-python-7.0.9999.ebuild |
40 |
@@ -31,6 +31,12 @@ DEPEND="${RDEPEND}" |
41 |
|
42 |
S=${WORKDIR}/${P}/bindings/python |
43 |
|
44 |
+PATCHES=( |
45 |
+ # update completion test results due to completion changes |
46 |
+ # https://reviews.llvm.org/D50171 |
47 |
+ "${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch |
48 |
+) |
49 |
+ |
50 |
src_unpack() { |
51 |
git-r3_fetch |
52 |
git-r3_checkout '' '' '' bindings/python |
53 |
|
54 |
diff --git a/dev-python/clang-python/clang-python-9999.ebuild b/dev-python/clang-python/clang-python-9999.ebuild |
55 |
index cf488945799..b3138a01e17 100644 |
56 |
--- a/dev-python/clang-python/clang-python-9999.ebuild |
57 |
+++ b/dev-python/clang-python/clang-python-9999.ebuild |
58 |
@@ -30,6 +30,12 @@ DEPEND="${RDEPEND}" |
59 |
|
60 |
S=${WORKDIR}/${P}/bindings/python |
61 |
|
62 |
+PATCHES=( |
63 |
+ # update completion test results due to completion changes |
64 |
+ # https://reviews.llvm.org/D50171 |
65 |
+ "${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch |
66 |
+) |
67 |
+ |
68 |
src_unpack() { |
69 |
git-r3_fetch |
70 |
git-r3_checkout '' '' '' bindings/python |
71 |
|
72 |
diff --git a/dev-python/clang-python/files/9999/0001-python-tests-Update-test_code_completion.patch b/dev-python/clang-python/files/9999/0001-python-tests-Update-test_code_completion.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..824da55ca41 |
75 |
--- /dev/null |
76 |
+++ b/dev-python/clang-python/files/9999/0001-python-tests-Update-test_code_completion.patch |
77 |
@@ -0,0 +1,33 @@ |
78 |
+From c083c4bbe436bb0db520998e035ec384dd87e0ad Mon Sep 17 00:00:00 2001 |
79 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
80 |
+Date: Thu, 2 Aug 2018 10:25:10 +0200 |
81 |
+Subject: [PATCH] [python] [tests] Update test_code_completion |
82 |
+ |
83 |
+Update expected completions to match output generated by clang-7.0. |
84 |
+--- |
85 |
+ bindings/python/tests/cindex/test_code_completion.py | 8 ++++---- |
86 |
+ 1 file changed, 4 insertions(+), 4 deletions(-) |
87 |
+ |
88 |
+diff --git a/bindings/python/tests/cindex/test_code_completion.py b/bindings/python/tests/cindex/test_code_completion.py |
89 |
+index a56bb304cd..efc7912c91 100644 |
90 |
+--- a/tests/cindex/test_code_completion.py |
91 |
++++ b/tests/cindex/test_code_completion.py |
92 |
+@@ -61,11 +61,11 @@ void f(P x, Q y) { |
93 |
+ cr = tu.codeComplete('fake.cpp', 12, 5, unsaved_files=files) |
94 |
+ |
95 |
+ expected = [ |
96 |
+- "{'const', TypedText} || Priority: 40 || Availability: Available || Brief comment: None", |
97 |
+- "{'volatile', TypedText} || Priority: 40 || Availability: Available || Brief comment: None", |
98 |
++ "{'const', TypedText} || Priority: 50 || Availability: Available || Brief comment: None", |
99 |
++ "{'volatile', TypedText} || Priority: 50 || Availability: Available || Brief comment: None", |
100 |
+ "{'operator', TypedText} || Priority: 40 || Availability: Available || Brief comment: None", |
101 |
+- "{'P', TypedText} | {'::', Text} || Priority: 75 || Availability: Available || Brief comment: None", |
102 |
+- "{'Q', TypedText} | {'::', Text} || Priority: 75 || Availability: Available || Brief comment: None" |
103 |
++ "{'P', TypedText} || Priority: 50 || Availability: Available || Brief comment: None", |
104 |
++ "{'Q', TypedText} || Priority: 50 || Availability: Available || Brief comment: None" |
105 |
+ ] |
106 |
+ self.check_completion_results(cr, expected) |
107 |
+ |
108 |
+-- |
109 |
+2.19.0 |
110 |
+ |