Ignore:
Timestamp:
Jul 12, 2021, 2:38:52 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6f27b67
Parents:
6ff08d8
Message:

Added a way to call the exception benchmark script so it is compatable with rmit.py.

File:
1 edited

Legend:

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

    r6ff08d8 r605673f  
    3838        done
    3939        exit 0
     40elif [ 2 == "$#" ]; then
     41    TEST_LANG="$1"
     42    TEST_CASE="$2"
     43# Just a weird hack to make this work with rmit.py.
     44elif [ 4 == "$#" ]; then
     45    # -l TEST_LANG -t TEST_CASE
     46    if [ "-l" = "$1" ]; then
     47        TEST_LANG="$2"
     48        TEST_CASE="$4"
     49    # -t TEST_CASE -l TEST_LANG
     50    else
     51        TEST_LANG="$4"
     52        TEST_CASE="$2"
     53    fi
     54else
     55    echo "Unknown call pattern." >&2
     56    exit 2
    4057fi
    4158
     
    4663}
    4764
    48 case "$2" in
     65case "$TEST_CASE" in
    4966cond-match-all)
    5067        CFAT="./cond-catch $ITERATIONS 1"
     
    96113        ;;
    97114*)
    98         echo "No such test." >&2
     115        echo "No such test: $TEST_CASE" >&2
    99116        exit 2
    100117        ;;
    101118esac
    102119
    103 case "$1" in
     120case "$TEST_LANG" in
    104121cfa-t) echo $CFAT; $CFAT;;
    105122cfa-r) echo $CFAR; $CFAR;;
    106123cpp) echo $CPP; $CPP;;
    107124java) echo $JAVA; $JAVA;;
     125*)
     126        echo "No such language: $TEST_LANG" >&2
     127        exit 2
    108128esac
Note: See TracChangeset for help on using the changeset viewer.