diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2018-08-30 16:46:48 +0200 |
---|---|---|
committer | Frederic Marec <frederic.marec@iot.bzh> | 2018-09-26 17:57:33 +0200 |
commit | 6e4f5c92c6162116b79dea2533d07a8723964232 (patch) | |
tree | d9b9ce85626806a56733aa898c2199838a48e556 /test/afb-test.sh | |
parent | f3d87deb907cb189b1a0cdb4af0b3d9df55a06fa (diff) |
Add tests for gps binding
ADD test.nmea in fixtures
ADD README.md to launch test
Change-Id: I10e12e94f8dfac54c6bb10c269c48c21a5971f8a
Signed-off-by: Frederic Marec <frederic.marec@iot.bzh>
Diffstat (limited to 'test/afb-test.sh')
-rwxr-xr-x | test/afb-test.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/afb-test.sh b/test/afb-test.sh new file mode 100755 index 0000000..83787ec --- /dev/null +++ b/test/afb-test.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +BINDER=$(command -v afb-daemon) +AFBTEST="$(pkg-config --variable libdir afb-test)/aft.so" +PROCNAME="aft-gps" +PORT=1234 +TOKEN= +LOGPIPE="test.pipe" +[ "$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-gps.so" \ + --binding="$AFBTEST" \ + --call="aft-gps/launch_all_tests:{}" \ + --call="aft-gps/exit:{}" \ + -vvv > ${LOGPIPE} 2>&1 + +find "${BUILDDIR}" -name test_results.log -exec cat {} \; |