diff options
author | Frederic Marec <frederic.marec@iot.bzh> | 2018-09-28 09:01:04 +0200 |
---|---|---|
committer | Frederic Marec <frederic.marec@iot.bzh> | 2018-09-28 16:07:21 +0200 |
commit | 5663caee2540dbc769d39c1e255c35493169b037 (patch) | |
tree | 9b2784c30f3c9a7619bfc94d08d4a04669a848dd /test/afb-test.sh | |
parent | d0a4331afd096d89325c213d7e933e96bee5b722 (diff) |
Add tests for data persistence binding
Add test tree structures
Add tests for persistence binding
Add dependency in README.md
Change-Id: If3fa3450fa61cd7e440712354b123d02934e2488
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..38c46ff --- /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-persistence" +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-persistence-binding.so" \ + --binding="$AFBTEST" \ + --call="aft-persistence/launch_all_tests:{}" \ + --call="aft-persistence/exit:{}" \ + -vvv > "${LOGFILE}" 2>&1 + +find "${BUILDDIR}" -name test_results.log -exec cat {} \; |