dev-python/clang-python: Patch completion test failures

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2018-09-19 19:22:43 +02:00
parent cca93e5971
commit 9abf52f390
4 changed files with 51 additions and 0 deletions

View File

@@ -29,6 +29,12 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/${MY_P}/bindings/python
PATCHES=(
# update completion test results due to completion changes
# https://reviews.llvm.org/D50171
"${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch
)
src_unpack() {
einfo "Unpacking parts of ${MY_P}.tar.xz ..."
tar -xJf "${DISTDIR}/${MY_P}.tar.xz" "${MY_P}/bindings/python" || die

View File

@@ -31,6 +31,12 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/${P}/bindings/python
PATCHES=(
# update completion test results due to completion changes
# https://reviews.llvm.org/D50171
"${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch
)
src_unpack() {
git-r3_fetch
git-r3_checkout '' '' '' bindings/python

View File

@@ -30,6 +30,12 @@ DEPEND="${RDEPEND}"
S=${WORKDIR}/${P}/bindings/python
PATCHES=(
# update completion test results due to completion changes
# https://reviews.llvm.org/D50171
"${FILESDIR}"/9999/0001-python-tests-Update-test_code_completion.patch
)
src_unpack() {
git-r3_fetch
git-r3_checkout '' '' '' bindings/python

View File

@@ -0,0 +1,33 @@
From c083c4bbe436bb0db520998e035ec384dd87e0ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Thu, 2 Aug 2018 10:25:10 +0200
Subject: [PATCH] [python] [tests] Update test_code_completion
Update expected completions to match output generated by clang-7.0.
---
bindings/python/tests/cindex/test_code_completion.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/bindings/python/tests/cindex/test_code_completion.py b/bindings/python/tests/cindex/test_code_completion.py
index a56bb304cd..efc7912c91 100644
--- a/tests/cindex/test_code_completion.py
+++ b/tests/cindex/test_code_completion.py
@@ -61,11 +61,11 @@ void f(P x, Q y) {
cr = tu.codeComplete('fake.cpp', 12, 5, unsaved_files=files)
expected = [
- "{'const', TypedText} || Priority: 40 || Availability: Available || Brief comment: None",
- "{'volatile', TypedText} || Priority: 40 || Availability: Available || Brief comment: None",
+ "{'const', TypedText} || Priority: 50 || Availability: Available || Brief comment: None",
+ "{'volatile', TypedText} || Priority: 50 || Availability: Available || Brief comment: None",
"{'operator', TypedText} || Priority: 40 || Availability: Available || Brief comment: None",
- "{'P', TypedText} | {'::', Text} || Priority: 75 || Availability: Available || Brief comment: None",
- "{'Q', TypedText} | {'::', Text} || Priority: 75 || Availability: Available || Brief comment: None"
+ "{'P', TypedText} || Priority: 50 || Availability: Available || Brief comment: None",
+ "{'Q', TypedText} || Priority: 50 || Availability: Available || Brief comment: None"
]
self.check_completion_results(cr, expected)
--
2.19.0