1 |
commit: 74fad3d399ed17cc72a718bf12fbe6a7bf545ecc |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 25 09:20:15 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 25 09:39:56 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74fad3d3 |
7 |
|
8 |
sci-mathematics/wxmaxima: run unit tests manually |
9 |
|
10 |
The full test suite fails even with virtualx, no error given. Let's run |
11 |
some of the unit tests manually for now as a compromise. |
12 |
|
13 |
Bug: https://bugs.gentoo.org/736695 |
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
sci-mathematics/wxmaxima/wxmaxima-21.01.0.ebuild | 31 ++++++++++++++++++++++-- |
17 |
1 file changed, 29 insertions(+), 2 deletions(-) |
18 |
|
19 |
diff --git a/sci-mathematics/wxmaxima/wxmaxima-21.01.0.ebuild b/sci-mathematics/wxmaxima/wxmaxima-21.01.0.ebuild |
20 |
index a76a6aeeb04..72cf6098d52 100644 |
21 |
--- a/sci-mathematics/wxmaxima/wxmaxima-21.01.0.ebuild |
22 |
+++ b/sci-mathematics/wxmaxima/wxmaxima-21.01.0.ebuild |
23 |
@@ -2,6 +2,7 @@ |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
|
26 |
EAPI=7 |
27 |
+ |
28 |
WX_GTK_VER="3.0-gtk3" |
29 |
PLOCALES="ca cs da de el en es fi fr gl hu it ja kab nb pl pt_BR ru tr uk zh_CN zh_TW" |
30 |
inherit cmake wxwidgets l10n xdg |
31 |
@@ -9,12 +10,13 @@ inherit cmake wxwidgets l10n xdg |
32 |
DESCRIPTION="Graphical frontend to Maxima, using the wxWidgets toolkit" |
33 |
HOMEPAGE="https://wxmaxima-developers.github.io/wxmaxima/" |
34 |
SRC_URI="https://github.com/wxMaxima-developers/wxmaxima/archive/Version-${PV}.tar.gz -> ${P}.tar.gz" |
35 |
+S="${WORKDIR}"/${PN}-Version-${PV} |
36 |
|
37 |
LICENSE="GPL-2" |
38 |
SLOT="0" |
39 |
KEYWORDS="~amd64 ~ppc ~x86" |
40 |
-IUSE="" |
41 |
-S="${WORKDIR}"/${PN}-Version-${PV} |
42 |
+IUSE="test" |
43 |
+RESTRICT="!test? ( test )" |
44 |
|
45 |
DEPEND=" |
46 |
dev-libs/libxml2:2 |
47 |
@@ -45,6 +47,31 @@ src_prepare() { |
48 |
l10n_for_each_disabled_locale_do rm_po |
49 |
} |
50 |
|
51 |
+src_configure() { |
52 |
+ local mycmakeargs=( |
53 |
+ -DWXM_UNIT_TESTS=$(usex test) |
54 |
+ ) |
55 |
+ |
56 |
+ cmake_src_configure |
57 |
+} |
58 |
+ |
59 |
+src_test() { |
60 |
+ # Just run the unit tests manually for now as tests fail in a non-descriptive |
61 |
+ # way even with virtualx |
62 |
+ # bug #736695 |
63 |
+ cd "${BUILD_DIR}/test/unit_tests" || die |
64 |
+ |
65 |
+ local tests=( |
66 |
+ AFontSize |
67 |
+ CellPtr |
68 |
+ ImgCell |
69 |
+ ) |
70 |
+ |
71 |
+ for test in "${tests[@]}" ; do |
72 |
+ ./test_${test} || die "Unit test ${test} failed!" |
73 |
+ done |
74 |
+} |
75 |
+ |
76 |
src_install() { |
77 |
docompress -x /usr/share/doc/${PF} |
78 |
cmake_src_install |