aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/run.sh
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-11-16 12:14:17 +0100
committerlemon <lsof@mailbox.org>2025-11-16 12:14:17 +0100
commite9dd9115e21c0a731c1b84120d2013aef9b0b1c9 (patch)
tree0e0c420fcf7d64871b2635717f6b9f6c35378839 /test/run.sh
parent111e71e1511b2abff9176bd6c714c8da796f770e (diff)
make clean test/build
Diffstat (limited to 'test/run.sh')
-rwxr-xr-xtest/run.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/run.sh b/test/run.sh
index dd8f431..5e0bc0f 100755
--- a/test/run.sh
+++ b/test/run.sh
@@ -14,10 +14,10 @@ run() {
f="$(basename "$1")"
expected=build/"$(echo "$f" | sed -s 's/\.c$/.expected/')"
echo ---- $f ---- >> log.txt
+ mkdir -p build/
args=$(awk '/\/\* ARGS:.*$/ {ORS=" ";for (i=3;i<NF;++i)print $i;ORS="\n";print""}' "$f")
awk '/\/\* EXPECT:$/ {x=k=any=1} x && /\*\// {x=0} x {if (!k)print $0;k=0} END{if(x||!any)exit 1;}' "$f" > "$expected"
if [ $? == 0 ]; then
- mkdir -p build/
obj=build/"$(echo "$f" | sed -s 's/\.c$/.o/')"
exe=build/"$(echo "$f" | sed -s 's/\.c$//')"
if ! ( x $ANTCC "$f" -c -o "$obj" && x $ANTCC "$obj" -o "$exe" ); then