Gavin Howard | 9269c2d | 2018-03-30 11:40:59 -0600 | [diff] [blame] | 1 | #! /bin/sh |
Gavin Howard | 64f113c | 2018-09-25 09:38:57 -0600 | [diff] [blame] | 2 | # |
| 3 | # Copyright 2018 Gavin D. Howard |
| 4 | # |
| 5 | # Permission to use, copy, modify, and/or distribute this software for any |
| 6 | # purpose with or without fee is hereby granted. |
| 7 | # |
| 8 | # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
| 9 | # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
| 10 | # AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
| 11 | # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
| 12 | # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
| 13 | # OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
| 14 | # PERFORMANCE OF THIS SOFTWARE. |
| 15 | # |
Gavin Howard | 96ac4e2 | 2018-02-14 17:12:51 -0700 | [diff] [blame] | 16 | |
Gavin Howard | 7a08da2 | 2018-03-30 11:26:39 -0600 | [diff] [blame] | 17 | set -e |
| 18 | |
Gavin Howard | 9b3739a | 2018-02-15 15:02:37 -0700 | [diff] [blame] | 19 | script="$0" |
| 20 | |
| 21 | testdir=$(dirname "$script") |
| 22 | |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 23 | if [ "$#" -lt 1 ]; then |
Gavin Howard | 9b3739a | 2018-02-15 15:02:37 -0700 | [diff] [blame] | 24 | bc="$testdir/../bc" |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 25 | else |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 26 | bc="$1" |
Gavin Howard | 14c4d45 | 2018-09-11 12:20:54 -0600 | [diff] [blame] | 27 | shift |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 28 | fi |
| 29 | |
Gavin Howard | 9269c2d | 2018-03-30 11:40:59 -0600 | [diff] [blame] | 30 | while read t; do |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 31 | |
Gavin Howard | d43ae75 | 2018-09-06 19:36:18 -0600 | [diff] [blame] | 32 | sh "$testdir/test.sh" "$t" "$bc" "$@" |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 33 | |
Gavin Howard | 9269c2d | 2018-03-30 11:40:59 -0600 | [diff] [blame] | 34 | done < "$testdir/all.txt" |
Gavin Howard | 85d68e3 | 2018-02-15 14:28:50 -0700 | [diff] [blame] | 35 | |
Gavin Howard | d43ae75 | 2018-09-06 19:36:18 -0600 | [diff] [blame] | 36 | sh "$testdir/scripts.sh" "$bc" "$@" |
Gavin Howard | 4efa244 | 2018-09-10 09:57:41 -0600 | [diff] [blame] | 37 | sh "$testdir/errors.sh" "$bc" "$@" |
Gavin Howard | c4e6c24 | 2018-09-21 22:54:41 -0600 | [diff] [blame] | 38 | |
| 39 | timeconst="$testdir/scripts/timeconst.bc" |
| 40 | |
| 41 | if [ -f "$timeconst" ]; then |
| 42 | sh "$testdir/timeconst.sh" "$timeconst" "$bc" "$@" |
| 43 | fi |