summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2021-12-08 17:35:50 +0100
committerAlfredo Tupone <tupone@gentoo.org>2021-12-08 17:36:21 +0100
commit9536c484d34ac3db9c18732b7127849dad4c1339 (patch)
tree4f83cb84e72d6247ddc88d422a3f1c443ba56cc6 /dev-ada
parentnet-vpn/wireguard-modules: bump to 1.0.20211208 (diff)
downloadgentoo-9536c484d34ac3db9c18732b7127849dad4c1339.tar.gz
gentoo-9536c484d34ac3db9c18732b7127849dad4c1339.tar.bz2
gentoo-9536c484d34ac3db9c18732b7127849dad4c1339.zip
dev-ada/langkit: add tests
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/langkit/files/langkit-22.0.0-test.patch20
-rw-r--r--dev-ada/langkit/langkit-22.0.0-r1.ebuild (renamed from dev-ada/langkit/langkit-22.0.0.ebuild)22
2 files changed, 40 insertions, 2 deletions
diff --git a/dev-ada/langkit/files/langkit-22.0.0-test.patch b/dev-ada/langkit/files/langkit-22.0.0-test.patch
new file mode 100644
index 000000000000..b083e60f680d
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-22.0.0-test.patch
@@ -0,0 +1,20 @@
+--- a/testsuite/python_support/utils.py 2021-12-08 14:12:47.457472580 +0100
++++ b/testsuite/python_support/utils.py 2021-12-08 14:14:26.142767154 +0100
+@@ -379,6 +379,7 @@
+ ))
+ run('gprbuild', '-Pgen', '-q', '-p',
+ '-XLIBRARY_TYPE=static',
++ '-XGNATCOLL_GMP_BUILD=static',
+ '-XXMLADA_BUILD=static')
+
+ for i, m in enumerate(ada_main):
+--- a/langkit/libmanage.py 2021-12-08 15:13:07.952581993 +0100
++++ b/langkit/libmanage.py 2021-12-08 15:13:58.429825946 +0100
+@@ -897,6 +897,7 @@
+ result = ['-XBUILD_MODE={}'.format(self.build_mode),
+ '-XLIBRARY_TYPE={}'.format(library_type),
+ '-XGPR_BUILD={}'.format(library_type),
++ '-XGNATCOLL_GMP_BUILD={}'.format(library_type),
+ '-XXMLADA_BUILD={}'.format(library_type)]
+
+ if self.enable_build_warnings:
diff --git a/dev-ada/langkit/langkit-22.0.0.ebuild b/dev-ada/langkit/langkit-22.0.0-r1.ebuild
index 2fe1c770f737..398c3148071d 100644
--- a/dev-ada/langkit/langkit-22.0.0.ebuild
+++ b/dev-ada/langkit/langkit-22.0.0-r1.ebuild
@@ -16,12 +16,11 @@ SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
-RESTRICT="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
- dev-ada/gnatcoll-bindings[iconv,shared]
+ dev-ada/gnatcoll-bindings[iconv,shared,static-libs]
dev-python/mako[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/funcy[${PYTHON_USEDEP}]
@@ -31,8 +30,20 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-gnarl.patch
+ "${FILESDIR}"/${P}-test.patch
)
+src_prepare() {
+ default
+ cd testsuite/tests
+
+ # missing gprbuild option to build libraries static/relocatable
+ rm -r {langkit_support,adalog,misc/link_two_libs} || die
+
+ # require railroad-diagrams
+ rm -r contrib/svg_railroad_diagrams || die
+}
+
src_compile() {
gprbuild -v -P support/langkit_support.gpr -p -j$(makeopts_jobs) \
-XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -cargs:Ada ${ADAFLAGS} \
@@ -40,6 +51,13 @@ src_compile() {
distutils-r1_src_compile
}
+src_test() {
+ ${EPYTHON} ./manage.py make --no-langkit-support || die
+ eval $(./manage.py setenv)
+ ${EPYTHON} ./manage.py test --verbose |& tee langkit.testOut
+ grep -qw FAIL langkit.testOut && die
+}
+
src_install() {
gprinstall -v -P support/langkit_support.gpr -p -XBUILD_MODE=dev \
--prefix="${D}"/usr --build-var=LIBRARY_TYPE \