diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/run_tests | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/run_tests b/tests/run_tests index 602aa92..ef38770 100755 --- a/tests/run_tests +++ b/tests/run_tests @@ -3,17 +3,24 @@ # Avoid bash localization of error messages export LC_ALL=C -ebegin() { printf '%s*%s %s ... ' "${GOOD}" "${NORMAL}" "$*" ; } -eend() { - local r=${1:-0} - shift - if [[ $r -eq 0 ]] ; then +functions_script="${EPREFIX}/lib/gentoo/functions.sh" +source "${functions_script}" || { + echo "${argv0}: Could not source ${functions_script}!" 1>&2 + + ebegin() { printf '%s*%s %s ... ' "${GOOD}" "${NORMAL}" "$*" ; } + + eend() { + local r=${1:-0} + shift + if [[ $r -eq 0 ]] ; then printf '[ %sok%s ]\n' "${GOOD}" "${NORMAL}" - else - printf '%s [ %s!!%s ]\n' "$*" "${BAD}" "${NORMAL}" - fi - return $r + else + printf '%s [ %s!!%s ]\n' "$*" "${BAD}" "${NORMAL}" + fi + return $r + } } + die() { echo "$*" 1>&2; exit 1; } vars=( CHOST GCC_CONFIG ROOT TROOT NOCOLOR RC_NOCOLOR ) |