cosmopolitan/test/libc/release/metal.sh
Justine Tunney d230a01222 Make build hermetic without shell scripts
- Fix some minor issues in ar.com
- Have execve() look for `ape` command
- Rewrite NT paths using /c/ rather /??/c:/
- Replace broken GCC symlinks with .sym files
- Rewrite $PATH environment variables on startup
- Make $(APE_NO_MODIFY_SELF) the default bootloader
- Add all build command dependencies to build/bootstrap
- Get the repository mostly building from source on non-Linux
2022-05-25 13:55:57 -07:00

28 lines
603 B
Bash
Executable file

#!/bin/sh
# TODO(jart): Stack size increase probably broke this.
exit
if [ "$MODE" = dbg ]; then
exit # TODO
fi
if [ "$MODE" = opt ] || [ "$MODE" = optlinux ]; then
exit
fi
$MKDIR o/$MODE/test/libc/release/
# smoke test booting on bare metal and printing data to serial uart
CMD="o/$MODE/tool/build/blinkenlights.com.dbg -r o/$MODE/examples/hello.com"
if OUTPUT="$($CMD)"; then
if [ x"$OUTPUT" = x"hello world" ]; then
exit 0
else
printf '%s\n' "error: $CMD printed wrong output: $OUTPUT" >&2
exit 1
fi
else
RC=$?
printf '%s\n' "error: $CMD failed: $RC" >&2
exit $RC
fi