aboutsummaryrefslogtreecommitdiffstats
path: root/test/afb-test/afb-test.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/afb-test/afb-test.sh')
-rwxr-xr-xtest/afb-test/afb-test.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/afb-test/afb-test.sh b/test/afb-test/afb-test.sh
new file mode 100755
index 0000000..aa96bb1
--- /dev/null
+++ b/test/afb-test/afb-test.sh
@@ -0,0 +1,34 @@
+#!/bin/sh -x
+
+BINDER=$(command -v afb-daemon)
+CLIENT=$(command -v afb-client-demo)
+AFBTEST="$(pkg-config --variable libdir afb-test)/aft.so"
+PROCNAME="aft-signal-composer"
+PORT=1234
+TOKEN=
+LOGPIPE="test.log"
+[ "$1" ] && BUILDDIR="$1" || exit 1
+
+[ ! -p $LOGPIPE ] && mkfifo $LOGPIPE
+
+pkill $PROCNAME
+
+${BINDER} --name="${PROCNAME}" \
+--port="${PORT}" \
+--roothttp=. \
+--tracereq=common \
+--token=${TOKEN} \
+--workdir="${BUILDDIR}/package" \
+--binding='/home/cmall/git/txc-demo/binding/build/afb-txc-binding.so' \
+--binding="lib/afb-signal-composer.so" \
+--binding="$AFBTEST" \
+--call="testSignal-composer/launch_all_tests:{}" \
+-vvv > ${LOGPIPE} 2>&1 &
+
+while read -r line
+do
+ [ "$(echo "${line}" | grep 'NOTICE: Browser URL=')" ] && break
+done < ${LOGPIPE}
+
+${CLIENT} ws://localhost:${PORT}/api?token=${TOKEN} testSignal-composer exit
+rm -f ${LOGPIPE} \ No newline at end of file