diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-25 14:02:43 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2016-03-25 14:02:43 -0400 |
commit | 62e238a6ef151d56b79e1f076a57463f2e1fb020 (patch) | |
tree | 29c858054c62230eb73330f165cf30ff20e14d86 /lisc/tools/abitest.sh | |
parent | 97b58def96d47d937d86849380d8316ddb16bed8 (diff) | |
download | roux-62e238a6ef151d56b79e1f076a57463f2e1fb020.tar.gz |
great renaming campain!
Diffstat (limited to 'lisc/tools/abitest.sh')
-rwxr-xr-x | lisc/tools/abitest.sh | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/lisc/tools/abitest.sh b/lisc/tools/abitest.sh deleted file mode 100755 index 6305176..0000000 --- a/lisc/tools/abitest.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh - -OCAMLC=/usr/bin/ocamlc -QBE=`pwd`/lisc - -failure() { - echo "Failure at stage:" $1 >&2 - exit 1 -} - -cleanup() { - rm -fr $TMP -} - -init() { - cp tools/abi.ml $TMP - pushd $TMP > /dev/null - - cat > Makefile << EOM - -.PHONY: test -test: caller.o callee.o - c99 -o \$@ caller.o callee.o -%.o: %.c - c99 -c -o \$@ \$< -%.o: %.ssa - $QBE -o \$*.s \$< - c99 -c -o \$@ \$*.s - -EOM - - if ! $OCAMLC abi.ml -o gentest - then - popd > /dev/null - cleanup - failure "abifuzz compilation" - fi - popd > /dev/null -} - -once() { - if test -z "$3" - then - $TMP/gentest $TMP $1 $2 - else - $TMP/gentest -s $3 $TMP $1 $2 - fi - make -C $TMP test > /dev/null || failure "building" - $TMP/test || failure "runtime" -} - -usage() { - echo "usage: abitest.sh [-callssa] [-callc] [-s SEED] [-n ITERATIONS]" >&2 - exit 1 -} - -N=1 -CALLER=c -CALLEE=ssa - -while test -n "$1" -do - case "$1" in - "-callssa") - ;; - "-callc") - CALLER=ssa - CALLEE=c - ;; - "-s") - test -n "$2" || usage - shift - SEED="$1" - ;; - "-n") - test -n "$2" || usage - shift - N="$1" - ;; - *) - usage - ;; - esac - shift -done - -TMP=`mktemp -d abifuzz.XXXXXX` - -init - -if test -n "$S" -then - once $CALLER $CALLEE $SEED -else - for n in `seq $N` - do - once $CALLER $CALLEE - echo "$n" | grep "00$" - done -fi - -echo "All done." - -cleanup |