cosmopolitan/test/libc/release/metal.sh
Justine Tunney a6baba1b07
Stop using .com extension in monorepo
The WIN32 CreateProcess() function does not require an .exe or .com
suffix in order to spawn an executable. Now that we have Cosmo bash
we're no longer so dependent on the cmd.exe prompt.
2024-03-03 03:12:19 -08:00

29 lines
595 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.dbg -r o/$MODE/examples/hello"
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