1 |
commit: d1d3ff20f334679c8299c1315cf20f4f557a9815 |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 27 13:42:50 2014 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 27 13:42:50 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=d1d3ff20 |
7 |
|
8 |
[eclass] Add support for virtualx for tests. |
9 |
|
10 |
--- |
11 |
eclass/qt5-build.eclass | 20 ++++++++++++++++++-- |
12 |
1 file changed, 18 insertions(+), 2 deletions(-) |
13 |
|
14 |
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass |
15 |
index c607f6f..e681517 100644 |
16 |
--- a/eclass/qt5-build.eclass |
17 |
+++ b/eclass/qt5-build.eclass |
18 |
@@ -17,7 +17,14 @@ case ${EAPI} in |
19 |
*) die "qt5-build.eclass: unsupported EAPI=${EAPI:-0}" ;; |
20 |
esac |
21 |
|
22 |
-inherit eutils flag-o-matic multilib toolchain-funcs versionator |
23 |
+# @ECLASS-VARIABLE: VIRTUALX_REQUIRED |
24 |
+# @DESCRIPTION: |
25 |
+# For proper description see virtualx.eclass manpage. |
26 |
+# Here we redefine default value to be manual, if your package needs virtualx |
27 |
+# for tests you should proceed with setting VIRTUALX_REQUIRED=test. |
28 |
+: ${VIRTUALX_REQUIRED:=manual} |
29 |
+ |
30 |
+inherit eutils flag-o-matic multilib toolchain-funcs versionator virtualx |
31 |
|
32 |
HOMEPAGE="http://qt-project.org/ http://qt.digia.com/" |
33 |
LICENSE="|| ( LGPL-2.1 GPL-3 )" |
34 |
@@ -270,7 +277,16 @@ qt5-build_src_test() { |
35 |
|
36 |
qt5_foreach_target_subdir qt5_qmake |
37 |
qt5_foreach_target_subdir emake |
38 |
- qt5_foreach_target_subdir emake TESTRUNNER="'${testrunner}'" check |
39 |
+ |
40 |
+ _test_runner() { |
41 |
+ qt5_foreach_target_subdir emake TESTRUNNER="'${testrunner}'" check |
42 |
+ } |
43 |
+ |
44 |
+ if [[ ${VIRTUALX_REQUIRED} == test ]]; then |
45 |
+ VIRTUALX_COMMAND="_test_runner" virtualmake |
46 |
+ else |
47 |
+ _test_runner |
48 |
+ fi |
49 |
} |
50 |
|
51 |
# @FUNCTION: qt5-build_src_install |