summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-25 14:54:34 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-09-25 14:54:34 +0200
commit513cb7f80f4d9eb85d15b58e7396709d5d1be39a (patch)
tree73cfde99fa4fcd58a0728241eeb3bb0a9677390a
parent390745b93c5f4af9b148c94433f44ec462a39770 (diff)
Use the unified script to launch tests
This use the dedicated script to launch tests on native development environment and get rid of the dedicated script afb-test.sh. Change-Id: Iaefa95bfd9c842da5ef87bd1adba87d5241a3d8c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--test/CMakeLists.txt4
-rwxr-xr-xtest/afb-test.sh35
2 files changed, 2 insertions, 37 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 0c422615..eea43f76 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -22,6 +22,6 @@
PROJECT_SUBDIRS_ADD(${PROJECT_SRC_DIR_PATTERN})
ADD_TEST(NAME AGL_SERVICE_CAN_LOW_LEVEL_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
)
diff --git a/test/afb-test.sh b/test/afb-test.sh
deleted file mode 100755
index 317c615b..00000000
--- a/test/afb-test.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/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-low-can"
-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-test" \
---binding="../package/lib/afb-low-can.so" \
---binding="$AFBTEST" \
--vvv \
---call="aft-low-can/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} aft-low-can exit
-
-rm -f ${LOGPIPE}