cosmopolitan/test/libc/release/metal.sh
Justine Tunney 798d542f15 Fix build and delete superfluous files
- Make Python make formatting pristine
- Add missing `#pragma weak` to Python source
- Fix Clang script flake due to missing directory
2021-08-09 06:57:14 -07:00

27 lines
564 B
Bash
Executable file

#!/bin/sh
if [ "$MODE" = dbg ]; then
exit # TODO
fi
if [ "$MODE" = opt ]; then
exit
fi
mkdir -p 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
touch o/$MODE/test/libc/release/metal.ok
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