Mail archive
alpine-aports

[alpine-aports] [PATCH 1/2] main/llvm5: fix too strict gtest banner filter

From: alpine-mips-patches <info_at_mobile-stream.com>
Date: Wed, 6 Dec 2018 06:33:07 +0000

LLVM googletest driver does not correctly filter out the banner
printed by the gtest tool and interprets it as another unittest.
This makes community/lld test suite fail:

UNRESOLVED: lld-Unit :: MachOTests/./lldMachOTests/Running main() from /home/buildozer/aports/main/gtest/src/googletest-release-1.8.1/googletest/src/gtest_main.cc (1229 of 1231)
******************** TEST 'lld-Unit :: MachOTests/./lldMachOTests/Running main() from /home/buildozer/aports/main/gtest/src/googletest-release-1.8.1/googletest/src/gtest_main.cc' FAILED ********************
Unable to find '[ PASSED ] 1 test.' in gtest output:

Running main() from /home/buildozer/aports/main/gtest/src/googletest-release-1.8.1/googletest/src/gtest_main.cc
Note: Google Test filter = Running main() from /home/buildozer/aports/main/gtest/src/googletest-release-1.8.1/googletest/src/gtest_main.cc
[==========] Running 0 tests from 0 test cases.
[==========] 0 tests from 0 test cases ran. (0 ms total)
[ PASSED ] 0 tests.
---
 main/llvm5/APKBUILD                                |  6 ++++--
 main/llvm5/fix-too-strict-gtest-banner-check.patch | 11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
 create mode 100644 main/llvm5/fix-too-strict-gtest-banner-check.patch
diff --git a/main/llvm5/APKBUILD b/main/llvm5/APKBUILD
index cbde304ede..19612efab2 100644
--- a/main/llvm5/APKBUILD
+++ b/main/llvm5/APKBUILD
_at_@ -6,7 +6,7 @@ _pkgname=llvm
 pkgver=5.0.1
 _majorver=${pkgver%%.*}
 pkgname=$_pkgname$_majorver
-pkgrel=5
+pkgrel=6
 pkgdesc="Low Level Virtual Machine compiler system, version $_majorver"
 arch="all"
 url="http://llvm.org/"
_at_@ -23,6 +23,7 @@ source="https://llvm.org/releases/$pkgver/llvm-$pkgver.src.tar.xz
 	fix-memory-mf_exec-on-aarch64.patch
 	fix-LLVMConfig-cmake-install-prefix.patch
 	fix-return-type-in-ORC-readMem-client-interface.patch
+	fix-too-strict-gtest-banner-check.patch
 	"
 builddir="$srcdir/$_pkgname-$pkgver.src"
 options="!checkroot"
_at_@ -260,4 +261,5 @@ sha512sums="bee1d45fca15ce725b1f2b1339b13eb6f750a3a321cfd099075477ec25835a8ca55b
 5e61bbeafa64dd858cde2e85d3001f3abc0379f7ca057e9f49684eeabc8b4663f79136d688aff8a83a480b3e7cde76823d381e9dd6933187a36ff59da85532b2  dynamiclibrary-fix-build-musl.patch
 e6d925ddc71f9f2ce8a859ac519dad51cba99c07129e378a5388bb1dd2f7d5b9d5ed392e85267fd20043789c7460a7d705eb8f970b2d130edbf5a934e9505ac4  fix-memory-mf_exec-on-aarch64.patch
 7d4825d16107e56a14b7b05be847f03d75e2e05952bea0742a1233b5b0441c9934d8058e612abb6471272884372d9bfd3348355fbd3c19cba82a554003cc3eec  fix-LLVMConfig-cmake-install-prefix.patch
-f57c734687c8ceae8d1bbfcbfdeecb75a5059a112967f4ba639d78d2484e0cc1deabf02ba2d3a6f5283443bf8b3230f38ad143800f8f3327cca0d2691a3ddc3d  fix-return-type-in-ORC-readMem-client-interface.patch"
+f57c734687c8ceae8d1bbfcbfdeecb75a5059a112967f4ba639d78d2484e0cc1deabf02ba2d3a6f5283443bf8b3230f38ad143800f8f3327cca0d2691a3ddc3d  fix-return-type-in-ORC-readMem-client-interface.patch
+95b335237328e249c7de71648385d90e736932b1d47cf07a9188ea98d4c2bc740f217e4145f65cb9822058515b6fccaeaf28fb0319fd692e7278a2d542186f54  fix-too-strict-gtest-banner-check.patch"
diff --git a/main/llvm5/fix-too-strict-gtest-banner-check.patch b/main/llvm5/fix-too-strict-gtest-banner-check.patch
new file mode 100644
index 0000000000..412888e420
--- /dev/null
+++ b/main/llvm5/fix-too-strict-gtest-banner-check.patch
_at_@ -0,0 +1,11 @@
+--- a/utils/lit/lit/formats/googletest.py
++++ b/utils/lit/lit/formats/googletest.py
+_at_@ -42,7 +42,7 @@
+         for ln in output.splitlines(False):  # Don't keep newlines.
+             ln = lit.util.to_string(ln)
+ 
+-            if 'Running main() from gtest_main.cc' in ln:
++            if ln.startswith('Running main() from '):
+                 # Upstream googletest prints this to stdout prior to running
+                 # tests. LLVM removed that print statement in r61540, but we
+                 # handle it here in case upstream googletest is being used.
-- 
2.19.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Thu Dec 06 2018 - 06:33:07 UTC