summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorClément Bénier <clement.benier@iot.bzh>2018-09-12 14:53:40 +0200
committerClément Bénier <clement.benier@iot.bzh>2018-09-12 14:57:46 +0200
commit77973a72cb095f23a1e9bc776582781e8316e265 (patch)
tree89ec80861c73fc79c9c107a924980a1f00b3f7ce /test
parent217bb01edca6fa9e5fc920cf596934727ffb92c3 (diff)
txc-binding: in conf files, rename api to txc
fix multiples errors, rename txc into txc-binding Change-Id: I9cd32cf157e407d98293bc869ed08cc93518a555 Signed-off-by: Clément Bénier <clement.benier@iot.bzh>
Diffstat (limited to 'test')
-rwxr-xr-xtest/afb-test.sh28
-rw-r--r--test/afb-test/etc/aft-signal-composer_config.json4
-rw-r--r--test/afb-test/fixtures/txc-binding/CMakeLists.txt3
3 files changed, 12 insertions, 23 deletions
diff --git a/test/afb-test.sh b/test/afb-test.sh
index f792fb2..ea5f2b3 100755
--- a/test/afb-test.sh
+++ b/test/afb-test.sh
@@ -1,10 +1,9 @@
-#!/bin/sh
+#!/bin/sh -x
trap "cleanup 0" EXIT
trap "cleanup 1" SIGINT SIGTERM SIGABRT SIGHUP
cleanup() {
trap '' SIGINT SIGTERM SIGABRT SIGHUP EXIT
kill $AFTESTPID > /dev/null 2>&1
- rm -f $AFTESTSOCKET
pkill $PROCNAME
exit $1
}
@@ -13,8 +12,7 @@ BINDER=$(command -v afb-daemon)
AFBTEST="$(pkg-config --variable libdir afb-test)/aft.so"
if [ ! $? -eq 0 ]; then echo "Set PKG_CONFIG_PATH for afb-test"; exit -1; fi
PROCNAME="afbd-signal-composer"
-PORT1=1234
-PORT2=1235
+PORT=1234
TOKEN=
[ "$1" ] && BUILDDIR="$1" || exit 1
AFTESTSOCKET=/tmp/signal-composer
@@ -26,24 +24,16 @@ export AFT_PLUGIN_PATH="${TESTPACKAGEDIR}/var:${TESTPACKAGEDIR}/lib/plugins"
pkill $PROCNAME
${BINDER} --name="${PROCNAME}" \
- --port="${PORT1}" \
+ --port="${PORT}" \
--tracereq=common \
--token=${TOKEN} \
- --rootdir="${TESTPACKAGEDIR}/../package" \
- --workdir="${TESTPACKAGEDIR}" \
- --binding="../package/lib/afb-signal-composer.so" \
- --ws-server=unix:${AFTESTSOCKET} > /dev/null 2>& 1 &
+ --workdir="${BUILDDIR}" \
+ --binding=${AFBTEST} \
+ --binding="package/lib/afb-signal-composer.so" \
+ -vvv \
+ --call="aft-signal-composer/launch_all_tests:{}" \
+ --call="aft-signal-composer/exit:{}"
AFTESTPID=$!
-sleep 0.3
-
-${BINDER} --name=aft-signal-composer \
---workdir="package-test/" \
---port="${PORT2}" \
---binding=${AFBTEST} \
---ws-client=unix:${AFTESTSOCKET} \
---call="aft-signal-composer/launch_all_tests:{}" \
---call="aft-signal-composer/exit:{}"
-
find "${BUILDDIR}" -name test_results.log -exec cat {} \;
diff --git a/test/afb-test/etc/aft-signal-composer_config.json b/test/afb-test/etc/aft-signal-composer_config.json
index 4ec2285..cab8f24 100644
--- a/test/afb-test/etc/aft-signal-composer_config.json
+++ b/test/afb-test/etc/aft-signal-composer_config.json
@@ -22,7 +22,7 @@
"mapis": [{
"uid": "txc-binding",
"info": "Faked txc-binding API",
- "libs": "txc-binding.c",
+ "libs": "txc-binding.ctlso",
"verbs": [
{
"uid": "subscribe",
@@ -46,4 +46,4 @@
}
]
}]
-} \ No newline at end of file
+}
diff --git a/test/afb-test/fixtures/txc-binding/CMakeLists.txt b/test/afb-test/fixtures/txc-binding/CMakeLists.txt
index 76a4923..fbc65f3 100644
--- a/test/afb-test/fixtures/txc-binding/CMakeLists.txt
+++ b/test/afb-test/fixtures/txc-binding/CMakeLists.txt
@@ -28,11 +28,10 @@ PROJECT_TARGET_ADD(txc-binding)
SUFFIX ".ctlso"
PREFIX ""
LABELS "TEST-PLUGIN"
- LINK_FLAGS ${BINDINGS_LINK_FLAG}
OUTPUT_NAME ${TARGET_NAME}
)
# Library dependencies (include updates automatically)
TARGET_LINK_LIBRARIES(${TARGET_NAME}
ctl-utilities
- ${link_libraries}) \ No newline at end of file
+ ${link_libraries})