Changeset 4d8fbf4 for doc/theses/andrew_beach_MMath/code/test.sh
- Timestamp:
- Sep 16, 2021, 2:22:01 PM (3 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/theses/andrew_beach_MMath/code/test.sh
ra8367eb r4d8fbf4 12 12 # test.sh -v LANGUAGE TEST FILE 13 13 # View the result from TEST in LANGUAGE stored in FILE. 14 15 readonly DIR=$(dirname "$(readlink -f "$0")") 16 cd $DIR 14 17 15 18 readonly MIL=000000 … … 52 55 ) 53 56 54 if [ "-a" = "$1" ]; then # build all57 if [ "-a" = "$1" ]; then 55 58 for file in *.cfa *.cpp *.java; do 56 59 build $file 57 60 done 58 61 exit 0 59 elif [ "-b" = "$1" ]; then # build given62 elif [ "-b" = "$1" ]; then 60 63 for file in "${@:2}"; do 61 64 build $file 62 65 done 63 66 exit 0 64 elif [ "-c" = "$1" ]; then # clean all67 elif [ "-c" = "$1" ]; then 65 68 rm $(basename -s ".cfa" -a *.cfa) 66 69 rm $(basename -s ".cpp" -a *.cpp) … … 89 92 raise-empty) 90 93 CFAT="./throw-empty $ITERS_1M $STACK_HEIGHT" 91 CFAR="./resume-empty $ITERS_1 M $STACK_HEIGHT"94 CFAR="./resume-empty $ITERS_10M $STACK_HEIGHT" 92 95 CPP="./throw-empty-cpp $ITERS_1M $STACK_HEIGHT" 93 96 JAVA="java ThrowEmpty $ITERS_1M $STACK_HEIGHT" … … 96 99 raise-detor) 97 100 CFAT="./throw-detor $ITERS_1M $STACK_HEIGHT" 98 CFAR="./resume-detor $ITERS_1 M $STACK_HEIGHT"101 CFAR="./resume-detor $ITERS_10M $STACK_HEIGHT" 99 102 CPP="./throw-detor-cpp $ITERS_1M $STACK_HEIGHT" 100 103 JAVA=unsupported … … 103 106 raise-finally) 104 107 CFAT="./throw-finally $ITERS_1M $STACK_HEIGHT" 105 CFAR="./resume-finally $ITERS_1 M $STACK_HEIGHT"108 CFAR="./resume-finally $ITERS_10M $STACK_HEIGHT" 106 109 CPP=unsupported 107 110 JAVA="java ThrowFinally $ITERS_1M $STACK_HEIGHT" … … 110 113 raise-other) 111 114 CFAT="./throw-other $ITERS_1M $STACK_HEIGHT" 112 CFAR="./resume-other $ITERS_1 M $STACK_HEIGHT"115 CFAR="./resume-other $ITERS_10M $STACK_HEIGHT" 113 116 CPP="./throw-other-cpp $ITERS_1M $STACK_HEIGHT" 114 117 JAVA="java ThrowOther $ITERS_1M $STACK_HEIGHT" … … 131 134 cond-match-all) 132 135 CFAT="./cond-catch $ITERS_10M 1" 133 CFAR="./cond-fixup $ITERS_10 M 1"136 CFAR="./cond-fixup $ITERS_100M 1" 134 137 CPP="./cond-catch-cpp $ITERS_10M 1" 135 138 JAVA="java CondCatch $ITERS_10M 1" … … 138 141 cond-match-none) 139 142 CFAT="./cond-catch $ITERS_10M 0" 140 CFAR="./cond-fixup $ITERS_10 M 0"143 CFAR="./cond-fixup $ITERS_100M 0" 141 144 CPP="./cond-catch-cpp $ITERS_10M 0" 142 145 JAVA="java CondCatch $ITERS_10M 0" … … 164 167 165 168 case "$TEST_LANG" in 166 167 168 169 170 171 172 173 169 cfa-t) CALL="$CFAT";; 170 cfa-r) CALL="$CFAR";; 171 cpp) CALL="$CPP";; 172 java) CALL="$JAVA";; 173 python) CALL="$PYTHON";; 174 *) 175 echo "No such language: $TEST_LANG" >&2 176 exit 2 174 177 ;; 175 178 esac … … 178 181 179 182 if [ -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' 181 184 exit 182 185 fi
Note: See TracChangeset
for help on using the changeset viewer.