Ignore:
Timestamp:
Sep 16, 2021, 2:22:01 PM (3 years ago)
Author:
caparsons <caparson@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, master, pthread-emulation, qualifiedEnum
Children:
432bffe, 7e7a076
Parents:
a8367eb (diff), 140eb16 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/andrew_beach_MMath/code/test.sh

    ra8367eb r4d8fbf4  
    1212# test.sh -v LANGUAGE TEST FILE
    1313#   View the result from TEST in LANGUAGE stored in FILE.
     14
     15readonly DIR=$(dirname "$(readlink -f "$0")")
     16cd $DIR
    1417
    1518readonly MIL=000000
     
    5255)
    5356
    54 if [ "-a" = "$1" ]; then                        # build all
     57if [ "-a" = "$1" ]; then
    5558        for file in *.cfa *.cpp *.java; do
    5659                build $file
    5760        done
    5861        exit 0
    59 elif [ "-b" = "$1" ]; then                      # build given
     62elif [ "-b" = "$1" ]; then
    6063        for file in "${@:2}"; do
    6164                build $file
    6265        done
    6366        exit 0
    64 elif [ "-c" = "$1" ]; then                      # clean all
     67elif [ "-c" = "$1" ]; then
    6568        rm $(basename -s ".cfa" -a *.cfa)
    6669        rm $(basename -s ".cpp" -a *.cpp)
     
    8992raise-empty)
    9093        CFAT="./throw-empty $ITERS_1M $STACK_HEIGHT"
    91         CFAR="./resume-empty $ITERS_1M $STACK_HEIGHT"
     94        CFAR="./resume-empty $ITERS_10M $STACK_HEIGHT"
    9295        CPP="./throw-empty-cpp $ITERS_1M $STACK_HEIGHT"
    9396        JAVA="java ThrowEmpty $ITERS_1M $STACK_HEIGHT"
     
    9699raise-detor)
    97100        CFAT="./throw-detor $ITERS_1M $STACK_HEIGHT"
    98         CFAR="./resume-detor $ITERS_1M $STACK_HEIGHT"
     101        CFAR="./resume-detor $ITERS_10M $STACK_HEIGHT"
    99102        CPP="./throw-detor-cpp $ITERS_1M $STACK_HEIGHT"
    100103        JAVA=unsupported
     
    103106raise-finally)
    104107        CFAT="./throw-finally $ITERS_1M $STACK_HEIGHT"
    105         CFAR="./resume-finally $ITERS_1M $STACK_HEIGHT"
     108        CFAR="./resume-finally $ITERS_10M $STACK_HEIGHT"
    106109        CPP=unsupported
    107110        JAVA="java ThrowFinally $ITERS_1M $STACK_HEIGHT"
     
    110113raise-other)
    111114        CFAT="./throw-other $ITERS_1M $STACK_HEIGHT"
    112         CFAR="./resume-other $ITERS_1M $STACK_HEIGHT"
     115        CFAR="./resume-other $ITERS_10M $STACK_HEIGHT"
    113116        CPP="./throw-other-cpp $ITERS_1M $STACK_HEIGHT"
    114117        JAVA="java ThrowOther $ITERS_1M $STACK_HEIGHT"
     
    131134cond-match-all)
    132135        CFAT="./cond-catch $ITERS_10M 1"
    133         CFAR="./cond-fixup $ITERS_10M 1"
     136        CFAR="./cond-fixup $ITERS_100M 1"
    134137        CPP="./cond-catch-cpp $ITERS_10M 1"
    135138        JAVA="java CondCatch $ITERS_10M 1"
     
    138141cond-match-none)
    139142        CFAT="./cond-catch $ITERS_10M 0"
    140         CFAR="./cond-fixup $ITERS_10M 0"
     143        CFAR="./cond-fixup $ITERS_100M 0"
    141144        CPP="./cond-catch-cpp $ITERS_10M 0"
    142145        JAVA="java CondCatch $ITERS_10M 0"
     
    164167
    165168case "$TEST_LANG" in
    166         cfa-t) CALL="$CFAT";;
    167         cfa-r) CALL="$CFAR";;
    168         cpp) CALL="$CPP";;
    169         java) CALL="$JAVA";;
    170         python) CALL="$PYTHON";;
    171         *)
    172                 echo "No such language: $TEST_LANG" >&2
    173                 exit 2
     169cfa-t) CALL="$CFAT";;
     170cfa-r) CALL="$CFAR";;
     171cpp) CALL="$CPP";;
     172java) CALL="$JAVA";;
     173python) CALL="$PYTHON";;
     174*)
     175        echo "No such language: $TEST_LANG" >&2
     176        exit 2
    174177        ;;
    175178esac
     
    178181
    179182if [ -n "$VIEW_FILE" ]; then
    180         grep -A 1 -B 0 "$CALL" "$VIEW_FILE" | sed -n -e 's!Run-Time (ns): !!;T;p'
     183        grep -A 1 -B 0 "$CALL" "$VIEW_FILE" | sed -n -e 's!Run-Time.*: !!;T;p'
    181184        exit
    182185fi
Note: See TracChangeset for help on using the changeset viewer.