1 |
commit: 6be4d9ba10030fdd460e885885df3119aca9d827 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 18 20:26:25 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 18:21:14 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6be4d9ba |
7 |
|
8 |
sys-libs/libomp: Enable tests |
9 |
|
10 |
sys-libs/libomp/libomp-9999.ebuild | 30 +++++++++++++++++++++++++++--- |
11 |
1 file changed, 27 insertions(+), 3 deletions(-) |
12 |
|
13 |
diff --git a/sys-libs/libomp/libomp-9999.ebuild b/sys-libs/libomp/libomp-9999.ebuild |
14 |
index aea0124..2496f20 100644 |
15 |
--- a/sys-libs/libomp/libomp-9999.ebuild |
16 |
+++ b/sys-libs/libomp/libomp-9999.ebuild |
17 |
@@ -5,8 +5,9 @@ |
18 |
EAPI=6 |
19 |
|
20 |
: ${CMAKE_MAKEFILE_GENERATOR:=ninja} |
21 |
+PYTHON_COMPAT=( python2_7 ) |
22 |
|
23 |
-inherit cmake-multilib git-r3 |
24 |
+inherit cmake-multilib git-r3 python-any-r1 |
25 |
|
26 |
DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" |
27 |
HOMEPAGE="http://openmp.llvm.org" |
28 |
@@ -17,9 +18,26 @@ EGIT_REPO_URI="http://llvm.org/git/openmp.git |
29 |
LICENSE="UoI-NCSA" |
30 |
SLOT="0" |
31 |
KEYWORDS="" |
32 |
-IUSE="" |
33 |
+IUSE="test" |
34 |
|
35 |
-DEPEND="dev-lang/perl" |
36 |
+# tests: |
37 |
+# - dev-python/lit provides the test runner |
38 |
+# - sys-devel/llvm provide test utils (e.g. FileCheck) |
39 |
+# - sys-devel/clang provides the compiler to run tests |
40 |
+DEPEND="dev-lang/perl |
41 |
+ test? ( |
42 |
+ $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') |
43 |
+ sys-devel/llvm |
44 |
+ sys-devel/clang[${MULTILIB_USEDEP}] |
45 |
+ )" |
46 |
+ |
47 |
+python_check_deps() { |
48 |
+ has_version "dev-python/lit[${PYTHON_USEDEP}]" |
49 |
+} |
50 |
+ |
51 |
+pkg_setup() { |
52 |
+ use test && python-any-r1_pkg_setup |
53 |
+} |
54 |
|
55 |
multilib_src_configure() { |
56 |
local libdir="$(get_libdir)" |
57 |
@@ -29,6 +47,12 @@ multilib_src_configure() { |
58 |
-DLIBOMP_INSTALL_ALIASES=OFF |
59 |
# disable unnecessary hack copying stuff back to srcdir |
60 |
-DLIBOMP_COPY_EXPORTS=OFF |
61 |
+ -DLIBOMP_LLVM_LIT_EXECUTABLE="${EPREFIX}/usr/bin/lit" |
62 |
+ -DLIBOMP_TEST_COMPILER="${EPREFIX}/usr/bin/${CHOST}-clang" |
63 |
) |
64 |
cmake-utils_src_configure |
65 |
} |
66 |
+ |
67 |
+multilib_src_test() { |
68 |
+ cmake-utils_src_make check-libomp |
69 |
+} |