aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-14 18:35:41 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-09-25 16:35:16 +0200
commit3db71f8774af1e1553e1b5a85ab62e210889dbe1 (patch)
tree5f39ad6d1fd2f76fa53d4fda58f5fa0ea33e8d37 /test
parent7608c49be21ae194a4600a053ffc4806164fb578 (diff)
Script for both native and target launch
Change-Id: I975c6c8e5eb41d7197ee7992762799b72d7bcb41 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt4
-rwxr-xr-xtest/afb-test.sh43
2 files changed, 2 insertions, 45 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 94dca38..d75b1c9 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -22,6 +22,6 @@
PROJECT_SUBDIRS_ADD(${PROJECT_SRC_DIR_PATTERN})
ADD_TEST(NAME AFB-TEST_TESTS
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND afb-test.sh "${CMAKE_BINARY_DIR}"
+ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+ COMMAND afm-test "${CMAKE_BINARY_DIR}/package" "${CMAKE_BINARY_DIR}/package-test" SERVICE
)
diff --git a/test/afb-test.sh b/test/afb-test.sh
deleted file mode 100755
index cd722cc..0000000
--- a/test/afb-test.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-
-trap "cleanup 1" SIGINT SIGTERM SIGABRT SIGHUP
-trap "cleanup 0" EXIT
-
-cleanup() {
- trap '' SIGINT SIGTERM SIGABRT SIGHUP EXIT
- kill $AFTESTPID > /dev/null 2>&1
- rm -f $AFTESTSOCKET
- pkill $PROCNAME
- exit $1
-}
-
-BINDER=$(command -v afb-daemon)
-PROCNAME="aft-aftest"
-PORT=1234
-TOKEN=
-AFTESTSOCKET=/tmp/afTest
-
-[ "$1" ] && BUILDDIR="$1" || exit 1
-
-pkill $PROCNAME
-
-${BINDER} --name=afbd-aftest \
---workdir="${BUILDDIR}/package" \
---binding=lib/aft.so \
---ws-server=unix:${AFTESTSOCKET} > /dev/null 2>&1 &
-AFTESTPID=$!
-
-sleep 0.3
-
-${BINDER} --name="${PROCNAME}" \
---port="${PORT}" \
---no-httpd \
---tracereq=common \
---token=${TOKEN} \
---workdir="${BUILDDIR}/package-test" \
---binding="${BUILDDIR}/package/lib/aft.so" \
---ws-client=unix:${AFTESTSOCKET} \
---call="aft-aftest/launch_all_tests:{}" \
---call="aft-aftest/exit:{}"
-
-find "${BUILDDIR}" -name test_results.log -exec cat {} \;