strace/tests/init.sh
Dmitry V. Levin 3ec5c0492c tests: cleanup checks for basic programs
* tests/init.sh: Check for cat and rm.
* tests/getdents.test: Check for awk.
* tests/ptrace_setoptions.test: Check for grep.
* tests/net-fd.test: Do not check for rm.
* tests/net.test: Likewise.
* tests/scm_rights-fd.test: Likewise.
* tests/stat.test: Likewise.
* tests/uio.test: Likewise.
2014-09-23 01:51:05 +00:00

26 lines
533 B
Bash

#!/bin/sh
ME_="${0##*/}"
warn_() { printf >&2 '%s\n' "$*"; }
fail_() { warn_ "$ME_: failed test: $*"; exit 1; }
skip_() { warn_ "$ME_: skipped test: $*"; exit 77; }
framework_failure_() { warn_ "$ME_: framework failure: $*"; exit 99; }
framework_skip_() { warn_ "$ME_: framework skip: $*"; exit 77; }
check_prog()
{
type "$@" > /dev/null 2>&1 ||
framework_skip_ "$* is not available"
}
check_prog cat
check_prog rm
LOG="$ME_.tmp"
rm -f "$LOG"
: "${STRACE:=../strace}"
: "${TIMEOUT_DURATION:=60}"
: "${SLEEP_A_BIT:=sleep 1}"