#!/usr/bin/env build build_make_test_cleanup() { ret=$? if [ ${ret} -ne 0 ]; then echo "error: test failed for ${CATEGORY}/${NAME}" >&2 echo "logfile: '${PKG_LOGFILE}'" >&2 exit ${ret} fi exit 0 } pkg_test() { echo "test: no test defined"; } build_make_test() {( trap build_make_test_cleanup 0 echo "testing: ${1}" load_rules "${1}" mkenv "test" PKG_LOGFILE="${L}/test" cd "${W}" pkg_test >> "${PKG_LOGFILE}" 2>&1 )} if test "${BUILDER_CALL_STACK}" = '__main__'; then simple_usage 'test' '[all|[/]]' "$@" build_make_test "${@}" fi # vim: filetype=sh