#!/bin/sh # Build and run the compiler fixtures on the released Vinix kernel. set -eu export PATH=/bin:/usr/bin:/sbin:/usr/sbin export HOME=/tmp LC_ALL=C phase=start finish() { rc=$? if [ "$rc" -ne 0 ]; then printf 'VPAC TOOLCHAIN GUEST FAIL %s %s\n' "$phase" "$rc"; fi /sbin/poweroff -f } trap finish EXIT mkdir -p /tmp test "$(uname -o)" = Vinix arch=$(uname -m) test "$(gcc -dumpmachine)" = "$arch-linux-musl" test "$(g++ -dumpmachine)" = "$arch-linux-musl" mkdir /tmp/vinix-toolchain-test cp /usr/share/vinix-toolchain-test/* /tmp/vinix-toolchain-test/ cd /tmp/vinix-toolchain-test phase=compile-and-run make -j1 check if [ -n "${VINIX_TOOLCHAIN_NEXT_FIXTURE:-}" ]; then echo 'Vinix toolchain compiled and ran all six fixtures' trap - EXIT exec /bin/sh "$VINIX_TOOLCHAIN_NEXT_FIXTURE" fi echo 'VPAC FIXTURE GUEST PASS'