From 9abf52f39073b3945fb8c83ea8f27dc3edcf23a0 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Wed, 19 Sep 2018 19:22:43 +0200 Subject: dev-python/clang-python: Patch completion test failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/clang-python/clang-python-7.0.0.ebuild | 6 ++++ .../clang-python/clang-python-7.0.9999.ebuild | 6 ++++ dev-python/clang-python/clang-python-9999.ebuild | 6 ++++ ...-python-tests-Update-test_code_completion.patch | 33 ++++++++++++++++++++++ 4 files changed, 51 insertions(+) create mode 100644 dev-python/clang-python/files/9999/0001-python-tests-Update-test_code_completion.patch (limited to 'dev-python') diff --git a/dev-python/clang-python/clang-python-7.0.0.ebuild b/dev-python/clang-python/clang-python-7.0.0.ebuild index 5d6eaf45c6cd..6587ca010e17 100644 --- a/dev-python/clang-python/clang-python-7.0.0.ebuild +++ b/dev-python/clang-python/clang-python-7.0.0.ebuild @@ -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 diff --git a/dev-python/clang-python/clang-python-7.0.9999.ebuild b/dev-python/clang-python/clang-python-7.0.9999.ebuild index d0d8cf54084d..56917d10ff17 100644 --- a/dev-python/clang-python/clang-python-7.0.9999.ebuild +++ b/dev-python/clang-python/clang-python-7.0.9999.ebuild @@ -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 diff --git a/dev-python/clang-python/clang-python-9999.ebuild b/dev-python/clang-python/clang-python-9999.ebuild index cf488945799b..b3138a01e172 100644 --- a/dev-python/clang-python/clang-python-9999.ebuild +++ b/dev-python/clang-python/clang-python-9999.ebuild @@ -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 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 new file mode 100644 index 000000000000..824da55ca416 --- /dev/null +++ b/dev-python/clang-python/files/9999/0001-python-tests-Update-test_code_completion.patch @@ -0,0 +1,33 @@ +From c083c4bbe436bb0db520998e035ec384dd87e0ad Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +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 + -- cgit v1.2.3-65-gdbad