|
| 1 | +#!/bin/bash |
| 2 | +NODE="node -r esm" |
| 3 | +DIR=`dirname $0` |
| 4 | + |
| 5 | +if [ $# -eq 0 ]; then |
| 6 | + |
| 7 | + $NODE $DIR/tex-keyval-tests.js |
| 8 | + |
| 9 | + $NODE $DIR/parser-action-tests.js |
| 10 | + $NODE $DIR/parser-ams-tests.js |
| 11 | + $NODE $DIR/parser-amscd-tests.js |
| 12 | + $NODE $DIR/parser-amscomplex-tests.js |
| 13 | + $NODE $DIR/parser-amsenv-tests.js |
| 14 | + $NODE $DIR/parser-amserror-tests.js |
| 15 | + $NODE $DIR/parser-array-tests.js |
| 16 | + $NODE $DIR/parser-base-tests.js |
| 17 | + $NODE $DIR/parser-bbox-tests.js |
| 18 | + $NODE $DIR/parser-boldsymbol-tests.js |
| 19 | + $NODE $DIR/parser-braket-tests.js |
| 20 | + $NODE $DIR/parser-bussproofs-reginf-tests.js |
| 21 | + $NODE $DIR/parser-bussproofs-regproofs-tests.js |
| 22 | + $NODE $DIR/parser-cancel-tests.js |
| 23 | + $NODE $DIR/parser-colorv2-tests.js |
| 24 | + $NODE $DIR/parser-complex-tests.js |
| 25 | + $NODE $DIR/parser-digits-european-tests.js |
| 26 | + $NODE $DIR/parser-digits-tests.js |
| 27 | + $NODE $DIR/parser-enclose-tests.js |
| 28 | + $NODE $DIR/parser-error-tests.js |
| 29 | + $NODE $DIR/parser-extpfeil-tests.js |
| 30 | + $NODE $DIR/parser-fenced-tests.js |
| 31 | + $NODE $DIR/parser-html-tests.js |
| 32 | + $NODE $DIR/parser-internal-math-tests.js |
| 33 | + $NODE $DIR/parser-macros-tests.js |
| 34 | + $NODE $DIR/parser-mathchoice-tests.js |
| 35 | + $NODE $DIR/parser-matrix-tests.js |
| 36 | + $NODE $DIR/parser-mhchem-0-tests.js |
| 37 | + $NODE $DIR/parser-mhchem-1-tests.js |
| 38 | + $NODE $DIR/parser-mhchem-2-tests.js |
| 39 | + $NODE $DIR/parser-mhchem-3-tests.js |
| 40 | + $NODE $DIR/parser-mhchem-4-tests.js |
| 41 | + $NODE $DIR/parser-mhchem-5-tests.js |
| 42 | + $NODE $DIR/parser-mhchem-6-tests.js |
| 43 | + $NODE $DIR/parser-mhchem-7-tests.js |
| 44 | + $NODE $DIR/parser-mhchem-8-tests.js |
| 45 | + $NODE $DIR/parser-mhchem-9-tests.js |
| 46 | + $NODE $DIR/parser-movlim-tests.js |
| 47 | + $NODE $DIR/parser-multirel-tests.js |
| 48 | + $NODE $DIR/parser-multline-shove-tests.js |
| 49 | + $NODE $DIR/parser-ncerror-tests.js |
| 50 | + $NODE $DIR/parser-newcommand-tests.js |
| 51 | + $NODE $DIR/parser-noerror-tests.js |
| 52 | + $NODE $DIR/parser-noundefined-tests.js |
| 53 | + $NODE $DIR/parser-other-tests.js |
| 54 | + $NODE $DIR/parser-physics-1-0-tests.js |
| 55 | + $NODE $DIR/parser-physics-1-1-tests.js |
| 56 | + $NODE $DIR/parser-physics-1-2-tests.js |
| 57 | + $NODE $DIR/parser-physics-1-3-tests.js |
| 58 | + $NODE $DIR/parser-physics-1-4-tests.js |
| 59 | + $NODE $DIR/parser-physics-1-5-tests.js |
| 60 | + $NODE $DIR/parser-physics-1-6-tests.js |
| 61 | + $NODE $DIR/parser-physics-1-7-tests.js |
| 62 | + $NODE $DIR/parser-physics-2-0-tests.js |
| 63 | + $NODE $DIR/parser-physics-2-1-tests.js |
| 64 | + $NODE $DIR/parser-physics-2-2-tests.js |
| 65 | + $NODE $DIR/parser-physics-2-3-tests.js |
| 66 | + $NODE $DIR/parser-physics-2-4-tests.js |
| 67 | + $NODE $DIR/parser-physics-2-5-tests.js |
| 68 | + $NODE $DIR/parser-physics-2-6-tests.js |
| 69 | + $NODE $DIR/parser-physics-2-7-tests.js |
| 70 | + $NODE $DIR/parser-physics-3-0-tests.js |
| 71 | + $NODE $DIR/parser-physics-3-1-tests.js |
| 72 | + $NODE $DIR/parser-physics-3-2-tests.js |
| 73 | + $NODE $DIR/parser-physics-3-3-tests.js |
| 74 | + $NODE $DIR/parser-physics-3-4-tests.js |
| 75 | + $NODE $DIR/parser-physics-3-5-tests.js |
| 76 | + $NODE $DIR/parser-physics-3-6-tests.js |
| 77 | + $NODE $DIR/parser-physics-3-7-tests.js |
| 78 | + $NODE $DIR/parser-physics-4-0-tests.js |
| 79 | + $NODE $DIR/parser-physics-5-0-tests.js |
| 80 | + $NODE $DIR/parser-physics-5-1-tests.js |
| 81 | + $NODE $DIR/parser-physics-5-2-tests.js |
| 82 | + $NODE $DIR/parser-physics-5-3-tests.js |
| 83 | + $NODE $DIR/parser-physics-5-4-tests.js |
| 84 | + $NODE $DIR/parser-physics-5-5-tests.js |
| 85 | + $NODE $DIR/parser-physics-6-0-tests.js |
| 86 | + $NODE $DIR/parser-physics-6-1-tests.js |
| 87 | + $NODE $DIR/parser-physics-6-2-tests.js |
| 88 | + $NODE $DIR/parser-physics-6-3-tests.js |
| 89 | + $NODE $DIR/parser-physics-6-4-tests.js |
| 90 | + $NODE $DIR/parser-physics-7-0-tests.js |
| 91 | + $NODE $DIR/parser-physics-7-1-tests.js |
| 92 | + $NODE $DIR/parser-physics-7-10-tests.js |
| 93 | + $NODE $DIR/parser-physics-7-11-tests.js |
| 94 | + $NODE $DIR/parser-physics-7-2-tests.js |
| 95 | + $NODE $DIR/parser-physics-7-3-tests.js |
| 96 | + $NODE $DIR/parser-physics-7-4-tests.js |
| 97 | + $NODE $DIR/parser-physics-7-5-tests.js |
| 98 | + $NODE $DIR/parser-physics-7-6-tests.js |
| 99 | + $NODE $DIR/parser-physics-7-7-tests.js |
| 100 | + $NODE $DIR/parser-physics-7-8-tests.js |
| 101 | + $NODE $DIR/parser-physics-7-9-tests.js |
| 102 | + $NODE $DIR/parser-tag-all-tests.js |
| 103 | + $NODE $DIR/parser-tag-ams-tests.js |
| 104 | + $NODE $DIR/parser-tag-none-tests.js |
| 105 | + $NODE $DIR/parser-unicode-tests.js |
| 106 | + $NODE $DIR/parser-verb-tests.js |
| 107 | + |
| 108 | + exit 0 |
| 109 | +else |
| 110 | + repeat=$1 |
| 111 | +fi |
| 112 | + |
| 113 | +i=0 |
| 114 | +sum=0 |
| 115 | +while [ $i -lt $repeat ] |
| 116 | +do |
| 117 | + sum=$(( $sum + `$NODE $DIR/parser-tests.js | tail -1 | awk -Fm '{print $1}'`)) |
| 118 | + i=$(( $i + 1 )) |
| 119 | +done |
| 120 | + |
| 121 | +echo 'Total: ' $sum |
| 122 | +average=`bc -l <<< "($sum / $repeat)"` |
| 123 | +echo 'Average: ' $average |
0 commit comments