diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-21 13:55:38 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-21 13:55:38 -0400 |
commit | 6b58aaa7ea87772216aa0d4bfb1f3d959450c040 (patch) | |
tree | 83bd1424a313d10830fa5f8a3faa4a57543f33df /lisc | |
parent | 453baf68e02f985a7400207d133fff7b47440f22 (diff) | |
download | roux-6b58aaa7ea87772216aa0d4bfb1f3d959450c040.tar.gz |
add the ability to run with a seed
Diffstat (limited to 'lisc')
-rwxr-xr-x | lisc/tools/abitest.sh | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/lisc/tools/abitest.sh b/lisc/tools/abitest.sh index 096c4ef..0bd7c5b 100755 --- a/lisc/tools/abitest.sh +++ b/lisc/tools/abitest.sh @@ -9,21 +9,29 @@ failure() { exit 1 } +once() { + if test -z "$1" + then + $OCAML tools/abi.ml $TMP c ssa + else + $OCAML tools/abi.ml -s $1 $TMP c ssa + fi + + ./$QBE -o $TMP/callee.s $TMP/callee.ssa || + failure "qbe" + + c99 -g -o $TMP/abitest $TMP/caller.c $TMP/callee.s || + failure "cc + linking" + + $TMP/abitest || + failure "runtime" +} + if ! test -x $QBE then echo "error: I must run in the directory containing $QBE." >&2 exit 1 fi - $OCAML tools/abi.ml $TMP c ssa - - ./$QBE -o $TMP/callee.s $TMP/callee.ssa - || failure "qbe" - - c99 -g -o $TMP/abitest $TMP/caller.c $TMP/callee.s - || failure "cc + linking" - - $TMP/abitest - || failure "runtime" - -rm -fr $TMP +once "$1" +#rm -fr $TMP |