2021-02-08 17:19:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-03-01 14:24:11 +00:00
|
|
|
if [ "$MODE" = dbg ]; then
|
2021-02-26 02:30:17 +00:00
|
|
|
exit # TODO
|
|
|
|
fi
|
|
|
|
|
2021-10-15 02:36:49 +00:00
|
|
|
if [ "$MODE" = opt ] || [ "$MODE" = optlinux ]; then
|
2021-06-11 23:47:48 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2021-02-08 17:19:00 +00:00
|
|
|
# smoke test userspace binary emulation
|
|
|
|
CMD="o/$MODE/tool/build/blinkenlights.com.dbg 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
|