commit: 77a79765c7e6c8421c5591bd80954098631e3114 Author: Aisha Tammy <floss <AT> bsd <DOT> ac> AuthorDate: Tue Jun 22 19:34:00 2021 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Sat Jul 3 15:40:19 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77a79765
dev-lang/zig: enable tests for 0.7.1 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Aisha Tammy <gentoo <AT> aisha.cc> Closes: https://github.com/gentoo/gentoo/pull/21296 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> dev-lang/zig/zig-0.7.1.ebuild | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dev-lang/zig/zig-0.7.1.ebuild b/dev-lang/zig/zig-0.7.1.ebuild index 063604d4ceb..18ac8c97dc0 100644 --- a/dev-lang/zig/zig-0.7.1.ebuild +++ b/dev-lang/zig/zig-0.7.1.ebuild @@ -9,7 +9,8 @@ DESCRIPTION="A robust, optimal, and maintainable programming language" HOMEPAGE="https://ziglang.org/" LICENSE="MIT" SLOT="0" -IUSE="+experimental" +IUSE="+experimental test" +RESTRICT="!test? ( test )" if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ziglang/zig.git" @@ -19,6 +20,8 @@ else KEYWORDS="~amd64" fi +BUILD_DIR="${S}/build" + # According to zig's author, zig builds that do not support all targets are not # supported by the upstream project. ALL_LLVM_TARGETS=( @@ -50,3 +53,8 @@ src_configure() { ) cmake_src_configure } + +src_test() { + cd "${BUILD_DIR}" + ./zig build test || die +}