sus-regex/ctest
2024-04-09 20:17:19 +05:00

17 lines
404 B
Bash
Executable file

#!/bin/bash
{ ./build || exit; } 2>&1>/dev/null
export C_INCLUDE_PATH="$PWD:$C_INCLUDE_PATH"
export LD_LIBRARY_PATH="$PWD/target:$LD_LIBRARY_PATH"
export LIBRARY_PATH="$PWD/target:$LIBRARY_PATH"
gcc -O2 test.c -o target/cmogus -L"$LIBRARY_PATH" -l:amogus || exit
if [ -z "$NODEBUG" ];
then
gdb -q \
-iex 'set confirm no' \
-ex 'start' \
target/cmogus
#-ex 'layout asm' \
else
target/cmogus
fi