blob: bd9f5d64ed5ea6d16b5ad19661e4a2575f2f7a7f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/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
date >> "${BUILDER_TMPDIR}/${CATEGORY}/${NAME}/.test"
)}
if test "${BUILDER_CALL_STACK}" = '__main__'; then
simple_usage 'test' '[all|[<category>/]<package|all>]' "$@"
build_make_test "${@}"
fi
# vim: filetype=sh
|