diff options
author | Eric Joldasov <bratishkaerik@getgoogleoff.me> | 2023-05-01 19:58:59 +0600 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-05-13 04:28:16 +0100 |
commit | 17236bf13b73ff1558fec245631e14f370fbe117 (patch) | |
tree | a87d4beb3a165c43155b675db047104f409e43e6 /dev-lang | |
parent | dev-lang/zig: update LICENSE (diff) | |
download | gentoo-17236bf13b73ff1558fec245631e14f370fbe117.tar.gz gentoo-17236bf13b73ff1558fec245631e14f370fbe117.tar.bz2 gentoo-17236bf13b73ff1558fec245631e14f370fbe117.zip |
dev-lang/zig: update testing process for 9999
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Closes: https://github.com/gentoo/gentoo/pull/30616
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/zig/zig-9999.ebuild | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/dev-lang/zig/zig-9999.ebuild b/dev-lang/zig/zig-9999.ebuild index 2346feadd70a..dd8650c3aa2c 100644 --- a/dev-lang/zig/zig-9999.ebuild +++ b/dev-lang/zig/zig-9999.ebuild @@ -116,6 +116,7 @@ src_configure() { -DZIG_USE_LLVM_CONFIG=ON -DCMAKE_PREFIX_PATH="$(get_llvm_prefix ${LLVM_MAX_SLOT})" -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/$(get_libdir)/zig/${PV}" + -DZIG_NO_LANGREF="$(usex !doc ON OFF)" ) cmake_src_configure @@ -126,17 +127,25 @@ src_compile() { if use doc; then cd "${BUILD_DIR}" || die - edo ./zig2 run ../doc/docgen.zig -- --zig ./zig2 ../doc/langref.html.in "${S}/langref.html" - edo ./zig2 test ../lib/std/std.zig --zig-lib-dir ../lib -fno-emit-bin -femit-docs="${S}/std" + mv ./stage3/doc/langref.html "${S}" || die + edo ./stage3/bin/zig test ../lib/std/std.zig --zig-lib-dir ../lib -fno-emit-bin -femit-docs="${S}/std" fi } src_test() { cd "${BUILD_DIR}" || die local ZIG_TEST_ARGS="-Dstatic-llvm=false -Denable-llvm -Dskip-non-native \ - -Drelease -Dtarget=$(get_zig_target) -Dcpu=$(get_zig_mcpu)" - # TBF zig2 -> stage3/bin/zig when (if) https://github.com/ziglang/zig/pull/14255 will be merged - edo ./zig2 build test ${ZIG_TEST_ARGS} + -Doptimize=ReleaseSafe -Dtarget=$(get_zig_target) -Dcpu=$(get_zig_mcpu)" + local ZIG_TEST_STEPS=( + test-cases test-fmt test-behavior test-compiler-rt test-universal-libc test-compare-output + test-standalone test-c-abi test-link test-stack-traces test-cli test-asm-link test-translate-c + test-run-translated-c test-std + ) + + local step + for step in "${ZIG_TEST_STEPS[@]}" ; do + edob ./stage3/bin/zig build ${step} ${ZIG_TEST_ARGS} + done } src_install() { |