dev-util/meson: enable test phase
authorMike Gilbert <floppym@gentoo.org>
Sun, 7 Oct 2018 02:26:40 +0000 (22:26 -0400)
committerMike Gilbert <floppym@gentoo.org>
Sun, 7 Oct 2018 02:27:28 +0000 (22:27 -0400)
Closes: https://bugs.gentoo.org/615028
Package-Manager: Portage-2.3.50_p14, Repoman-2.3.11_p21
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
dev-util/meson/files/test-llvm.patch [new file with mode: 0644]
dev-util/meson/meson-0.48.0-r2.ebuild
dev-util/meson/meson-9999.ebuild

diff --git a/dev-util/meson/files/test-llvm.patch b/dev-util/meson/files/test-llvm.patch
new file mode 100644 (file)
index 0000000..af7b983
--- /dev/null
@@ -0,0 +1,26 @@
+From 40457b1faa2c5b274447838ff1a041a8030c6c22 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Sat, 6 Oct 2018 21:11:36 -0400
+Subject: [PATCH] Disable testing of static llvm linkage
+
+Gentoo doesn't provide static libs for llvm.
+---
+ test cases/frameworks/15 llvm/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build
+index e05fddd2..9b38a454 100644
+--- a/test cases/frameworks/15 llvm/meson.build        
++++ b/test cases/frameworks/15 llvm/meson.build        
+@@ -20,7 +20,7 @@ if not dep_tinfo.found()
+   dep_tinfo = cpp.find_library('tinfo', required: false)
+ endif
+-foreach static : [true, false]
++foreach static : [false]
+   llvm_dep = dependency(
+     'llvm',
+     modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
+-- 
+2.19.0
+
index aa2d0f068eb13cbd48c86f3de269264c45eaac5a..653033f818b0c56ce858b2e63633eadb284dfddf 100644 (file)
@@ -20,18 +20,26 @@ HOMEPAGE="http://mesonbuild.com/"
 LICENSE="Apache-2.0"
 SLOT="0"
 IUSE=""
-RESTRICT="test"
 
 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 RDEPEND=""
 
 PATCHES=(
+       "${FILESDIR}"/test-llvm.patch
        "${FILESDIR}"/0.48.0-multilib.patch
        "${FILESDIR}"/0.48.0-test-u.patch
 )
 
 python_test() {
-       ${EPYTHON} run_tests.py || die
+       (
+               # test_meson_installed
+               unset PYTHONDONTWRITEBYTECODE
+
+               # test_cross_file_system_paths
+               unset XDG_DATA_HOME
+
+               ${EPYTHON} -u run_tests.py
+       ) || die "Testing failed with ${EPYTHON}"
 }
 
 python_install_all() {
index aace7f3caa4f4ecf840b8c51a0b08845e1d6bb39..0d5b9b4711c317b3d082b3259791f75a1188f4d7 100644 (file)
@@ -20,13 +20,24 @@ HOMEPAGE="http://mesonbuild.com/"
 LICENSE="Apache-2.0"
 SLOT="0"
 IUSE=""
-RESTRICT="test"
 
 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
 RDEPEND=""
 
+PATCHES=(
+       "${FILESDIR}"/test-llvm.patch
+)
+
 python_test() {
-       ${EPYTHON} run_tests.py || die
+       (
+               # test_meson_installed
+               unset PYTHONDONTWRITEBYTECODE
+
+               # test_cross_file_system_paths
+               unset XDG_DATA_HOME
+
+               ${EPYTHON} -u run_tests.py
+       ) || die "Testing failed with ${EPYTHON}"
 }
 
 python_install_all() {