diff options
Diffstat (limited to 'test/afb-test.sh')
-rwxr-xr-x | test/afb-test.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/afb-test.sh b/test/afb-test.sh new file mode 100755 index 0000000..f11e4ea --- /dev/null +++ b/test/afb-test.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +BINDER=$(command -v afb-daemon) +AFBTEST="$(pkg-config --variable libdir afb-test)/aft.so" +PROCNAME="aft-iiodevices" +PORT=1234 +TOKEN= +LOGFILE="test.log" +[ "$1" ] && BUILDDIR="$1" || exit 1 + +TESTPACKAGEDIR="${BUILDDIR}/package-test" +export AFT_CONFIG_PATH="${TESTPACKAGEDIR}/etc" +export AFT_PLUGIN_PATH="${TESTPACKAGEDIR}/var:${TESTPACKAGEDIR}/lib/plugins" + +pkill $PROCNAME + +timeout -s 9 10 ${BINDER} --name="${PROCNAME}" \ + --port="${PORT}" \ + --roothttp=. \ + --tracereq=common \ + --token=${TOKEN} \ + --workdir="${TESTPACKAGEDIR}" \ + --binding="../package/lib/afb-iiodevices.so" \ + --binding="$AFBTEST" \ + --call="aft-iiodevices/launch_all_tests:{}" \ + --call="aft-iiodevices/exit:{}" \ + -vvv > "${LOGFILE}" 2>&1 + +find "${BUILDDIR}" -name test_results.log -exec cat {} \; + + |