zig/ci/drone/linux_script_test
Andrew Kelley ec95e00e28 flatten lib/std/special and improve "pkg inside another" logic
stage2: change logic for detecting whether the main package is inside
the std package. Previously it relied on realpath() which is not portable.
This uses resolve() which is how imports already work.

 * stage2: fix cleanup bug when creating Module
 * flatten lib/std/special/* to lib/*
   - this was motivated by making main_pkg_is_inside_std false for
     compiler_rt & friends.
 * rename "mini libc" to "universal libc"
2022-05-06 22:41:00 -07:00

53 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
. ./ci/drone/linux_script_base
BUILD_FLAGS="-Dskip-non-native"
case "$1" in
1)
./build/zig build $BUILD_FLAGS test-behavior
./build/zig build $BUILD_FLAGS test-compiler-rt
./build/zig build $BUILD_FLAGS test-fmt
./build/zig build $BUILD_FLAGS docs
;;
2)
# Debug
./build/zig build $BUILD_FLAGS test-std -Dskip-release-safe -Dskip-release-fast -Dskip-release-small
;;
3)
# ReleaseSafe
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-fast -Dskip-release-small
;;
4)
# Releasefast
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-small
;;
5)
# ReleaseSmall
./build/zig build $BUILD_FLAGS test-std -Dskip-debug -Dskip-release-safe -Dskip-release-fast
;;
6)
./build/zig build $BUILD_FLAGS test-universal-libc
./build/zig build $BUILD_FLAGS test-compare-output
./build/zig build $BUILD_FLAGS test-standalone -Dskip-release-safe
./build/zig build $BUILD_FLAGS test-stack-traces
./build/zig build $BUILD_FLAGS test-cli
./build/zig build $BUILD_FLAGS test-asm-link
./build/zig build $BUILD_FLAGS test-runtime-safety
./build/zig build $BUILD_FLAGS test-translate-c
;;
7)
./build/zig build $BUILD_FLAGS # test building self-hosted without LLVM
./build/zig build $BUILD_FLAGS test-stage2
;;
'')
echo "error: expecting test group argument"
exit 1
;;
*)
echo "error: unknown test group: $1"
exit 1
;;
esac