summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-16 18:39:43 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-09-27 13:05:37 +0200
commitc6fd6abed4c4d52835b4bb4aba68f415da908a1b (patch)
tree41d42962828686409ce3bbfee91ce2fb7ac37cdf /test
parent644318fecd112a60f364348c83aeac8a7db12aae (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: Ic254a3df90939df683e6d2ec5c72afcebc963b75 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt6
-rwxr-xr-xtest/afb-test.sh39
2 files changed, 3 insertions, 42 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f4d72ac..caafa1d 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_SIGNAL_COMPOSER_TESTS
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- COMMAND afb-test.sh ${CMAKE_BINARY_DIR}
-) \ No newline at end of file
+ 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 f4b8763..0000000
--- a/test/afb-test.sh
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/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
- pkill $PROCNAME
- exit $1
-}
-
-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"
-PORT=1234
-TOKEN=
-[ "$1" ] && BUILDDIR="$1" || exit 1
-AFTESTSOCKET=/tmp/signal-composer
-
-TESTPACKAGEDIR="${BUILDDIR}/package-test"
-export AFT_CONFIG_PATH="${TESTPACKAGEDIR}/etc"
-export AFT_PLUGIN_PATH="${TESTPACKAGEDIR}/var:${TESTPACKAGEDIR}/lib/plugins"
-
-pkill $PROCNAME
-
-${BINDER} --name="${PROCNAME}" \
- --port="${PORT}" \
- --tracereq=common \
- --token=${TOKEN} \
- --workdir="${BUILDDIR}/package-test" \
- --binding=${AFBTEST} \
- --binding="../package/lib/afb-signal-composer.so" \
- -vvv \
- --call="aft-signal-composer/launch_all_tests:{}" \
- --call="aft-signal-composer/exit:{}"
-AFTESTPID=$!
-
-find "${BUILDDIR}" -name test_results.log -exec cat {} \;
-