blob: a016b1c8eb7f04655f2f1230fdd519ef523e6964 [file] [log] [blame]
Dmitry V. Levin4e4b5ad2011-02-27 00:28:50 +00001#!/bin/sh
2
3ME_="${0##*/}"
4
5warn_() { printf >&2 '%s\n' "$*"; }
6fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
7skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }
8framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; }
9
10check_prog()
11{
12 "$@" --version > /dev/null 2>&1 ||
13 framework_failure_ "$* is not available"
14}
15
16check_strace()
17{
18 STRACE=${*-../strace}
19 $STRACE -V > /dev/null ||
20 framework_failure_ "$STRACE is not available"
21}