summaryrefslogtreecommitdiff
path: root/miniany/autobuild.sh
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2021-10-10 19:46:42 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2021-10-10 19:46:42 +0200
commitf895cabf52336db0f2a259bbe6fae6e6fc81c98a (patch)
tree7070d2689b0f589c4c0da91f7050c9ce0aafc033 /miniany/autobuild.sh
parent121209ac9702979d16b73340ec6a3a38adbe1b03 (diff)
downloadcompilertests-f895cabf52336db0f2a259bbe6fae6e6fc81c98a.tar.gz
compilertests-f895cabf52336db0f2a259bbe6fae6e6fc81c98a.tar.bz2
cc: work on int, char types
Diffstat (limited to 'miniany/autobuild.sh')
-rwxr-xr-xminiany/autobuild.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/miniany/autobuild.sh b/miniany/autobuild.sh
index e174ff4..8de5629 100755
--- a/miniany/autobuild.sh
+++ b/miniany/autobuild.sh
@@ -1,13 +1,29 @@
#!/bin/bash
cat >/tmp/autobuild_tmp_$$.sh <<EOF
-#!/bin/bash
+#!/bin/bash -x
echo "---"
./build.sh cc tcc hosted d
-./cc < test1.c > test1.asm
-fasm test1.asm test1.bin
-../ecomp-c/emul -v test1.bin
+if test \$? -eq 0; then
+ ./cc < test1.c > test1.asm
+ if test \$? -eq 0; then
+ fasm test1.asm test1.bin
+ if test \$? -eq 0; then
+ ../ecomp-c/emul -v test1.bin
+ if test \$? -ne 0; then
+ echo "ERROR: running emulator with test1.bin"
+ fi
+ else
+ echo "ERROR: assembling test1.asm"
+ fi
+ else
+ echo "ERROR: compiling test1.c"
+ grep '; ERROR' test1.asm
+ fi
+else
+ echo "ERROR: building cc"
+fi
EOF
chmod 775 /tmp/autobuild_tmp_$$.sh