blob: 7a6b4b165d936c046ab15403d9c8e4916387d172 [file] [log] [blame]
Gavin Howard9269c2d2018-03-30 11:40:59 -06001#! /bin/sh
Gavin Howard64f113c2018-09-25 09:38:57 -06002#
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 Howard96ac4e22018-02-14 17:12:51 -070016
Gavin Howard7a08da22018-03-30 11:26:39 -060017set -e
18
Gavin Howard9b3739a2018-02-15 15:02:37 -070019script="$0"
20
21testdir=$(dirname "$script")
22
Gavin Howard85d68e32018-02-15 14:28:50 -070023if [ "$#" -lt 1 ]; then
Gavin Howard9b3739a2018-02-15 15:02:37 -070024 bc="$testdir/../bc"
Gavin Howard85d68e32018-02-15 14:28:50 -070025else
Gavin Howard85d68e32018-02-15 14:28:50 -070026 bc="$1"
Gavin Howard14c4d452018-09-11 12:20:54 -060027 shift
Gavin Howard85d68e32018-02-15 14:28:50 -070028fi
29
Gavin Howard9269c2d2018-03-30 11:40:59 -060030while read t; do
Gavin Howard85d68e32018-02-15 14:28:50 -070031
Gavin Howardd43ae752018-09-06 19:36:18 -060032 sh "$testdir/test.sh" "$t" "$bc" "$@"
Gavin Howard85d68e32018-02-15 14:28:50 -070033
Gavin Howard9269c2d2018-03-30 11:40:59 -060034done < "$testdir/all.txt"
Gavin Howard85d68e32018-02-15 14:28:50 -070035
Gavin Howardd43ae752018-09-06 19:36:18 -060036sh "$testdir/scripts.sh" "$bc" "$@"
Gavin Howard4efa2442018-09-10 09:57:41 -060037sh "$testdir/errors.sh" "$bc" "$@"
Gavin Howardc4e6c242018-09-21 22:54:41 -060038
39timeconst="$testdir/scripts/timeconst.bc"
40
41if [ -f "$timeconst" ]; then
42 sh "$testdir/timeconst.sh" "$timeconst" "$bc" "$@"
43fi