symbian-qemu-0.9.1-12/dtc-trunk/tests/tests.sh
author John Kern <johnk@symbian.org>
Tue, 08 Dec 2009 11:07:49 -0800
changeset 23 8374da225e88
parent 1 2fb8b9db1c86
permissions -rw-r--r--
fix for S^2 builds

# Common functions for shell testcases

PASS () {
    echo "PASS"
    exit 0
}

FAIL () {
    echo "FAIL" "$@"
    exit 2
}

DTC=../dtc

verbose_run () {
    if [ -z "$QUIET_TEST" ]; then
	"$@"
    else
	"$@" > /dev/null 2> /dev/null
    fi
}

verbose_run_log () {
    LOG="$1"
    shift
    "$@" > "$LOG" 2>&1
    ret=$?
    if [ -z "$QUIET_TEST" ]; then
	cat "$LOG" >&2
    fi
    return $ret
}