diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2016-11-19 08:44:20 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2016-11-19 08:44:20 +0100 |
| commit | e9b748ff4440393565d323283180ccb99eba0722 (patch) | |
| tree | 673427a128438b703f2a875a5818f1a9aa2c6f4b /sam | |
| parent | ffd72e29a16475bbce474c55ff9ca45dca0bf30d (diff) | |
| download | vis-e9b748ff4440393565d323283180ccb99eba0722.tar.gz vis-e9b748ff4440393565d323283180ccb99eba0722.tar.xz | |
test/sam: try to fall back to `9 ssam` if ssam is not found
Diffstat (limited to 'sam')
| -rwxr-xr-x | sam/test.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sam/test.sh b/sam/test.sh index 42970b3..a3cc1e9 100755 --- a/sam/test.sh +++ b/sam/test.sh @@ -5,12 +5,18 @@ NL=' PLAN9="/usr/local/plan9/bin" [ -z "$VIS" ] && VIS="../../vis" -[ -z "$SSAM" ] && SSAM="$PLAN9/ssam" -type "$SSAM" >/dev/null 2>&1 || { - echo "ssam(1) not found, skipping tests" - exit 0 -} +if [ -z "$SSAM" ] || ! type "$SSAM" >/dev/null 2>&1; then + SSAM="$PLAN9/ssam" + if ! type "$SSAM" >/dev/null 2>&1; then + if type 9 >/dev/null 2>&1; then + SSAM="9 ssam" + else + echo "ssam(1) not found, skipping tests" + exit 0 + fi + fi +fi TESTS=$1 [ -z "$TESTS" ] && TESTS=$(find . -name '*.cmd' | sed 's/\.cmd$//g') @@ -18,6 +24,7 @@ TESTS=$1 TESTS_RUN=0 TESTS_OK=0 +echo "$SSAM" $VIS -v for t in $TESTS; do |
