summaryrefslogtreecommitdiffstats
path: root/coverage/scripts/run-test.sh
diff options
context:
space:
mode:
authorJose Bollo <jose.bollo@iot.bzh>2019-11-07 10:41:20 +0100
committerJose Bollo <jose.bollo@iot.bzh>2019-11-20 14:29:36 +0100
commit6f5915807393ba9276781bae961a5f4310335398 (patch)
treed74b83fc02ba52060d5cc03058b7b6b4fd259af8 /coverage/scripts/run-test.sh
parent29ae81fa15c6080fd27929f4cc78e1289cb920e9 (diff)
coverage: Fix regression
The coverage test was broken. This restores it. Also add a simple build script that covers most of the code by default. Bug-AGL: SPEC-2974 Change-Id: I4fc5a0ba54195738405460a04f985bb67b81b5df Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'coverage/scripts/run-test.sh')
-rwxr-xr-xcoverage/scripts/run-test.sh60
1 files changed, 56 insertions, 4 deletions
diff --git a/coverage/scripts/run-test.sh b/coverage/scripts/run-test.sh
index ddf0e09d..7dfb3695 100755
--- a/coverage/scripts/run-test.sh
+++ b/coverage/scripts/run-test.sh
@@ -55,9 +55,11 @@ mkdir /tmp/ldpaths
export AFB_LDPATHS=/tmp/ldpaths
export AFB_TRACEAPI=no
+echo '
##########################################################
# test to check options
##########################################################
+'
mk $R/bin/afb-daemon-cov --help
mk $R/bin/afb-daemon-cov --version
@@ -96,18 +98,22 @@ mk $R/bin/afb-daemon-cov --workdir=/etc/you/should/not/be/able/to/create/me
mk $R/bin/afb-daemon-cov --exec $R/it-doesn-t-exist
+echo '
##########################################################
# test of the bench
##########################################################
+'
mk $R/bin/test-apiset
mk $R/bin/test-session
mk $R/bin/test-wrap-json
+echo '
##########################################################
# true life test: run parts as direct client
##########################################################
+'
mk \
vg \
--log-file=$R/valgrind.out \
@@ -160,9 +166,11 @@ $R/bin/afb-daemon-cov \
--ws-server unix:$R/apis/ws/salut \
--exec $R/scripts/run-parts.sh @p @t
+echo '
##########################################################
-# true life test: run parts as in-direct client
+# true life test: run parts as in-direct server
##########################################################
+'
mk \
vg \
--log-file=$R/valgrind.out \
@@ -172,6 +180,46 @@ vg \
--show-leak-kinds=all \
--num-callers=50 \
$R/bin/afb-daemon-cov \
+ --foreground \
+ --verbose \
+ --verbose \
+ --roothttp $R/www \
+ --alias /icons:$R/www \
+ --workdir . \
+ --uploaddir . \
+ --rootdir . \
+ --port 8888 \
+ --ldpaths $R/ldpath/strong \
+ --binding $R/bin/demat.so \
+ --auto-api $R/apis/auto \
+ --random-token \
+ --ws-server unix:$R/apis/ws/hello \
+ --ws-server unix:$R/apis/ws/salut \
+ --ws-server localhost:9595/salut \
+ --exec \
+ $R/bin/afb-daemon-nocov \
+ --quiet \
+ --quiet \
+ --port 9999 \
+ --auto-api $R/apis/auto \
+ --auto-api $R/apis/ws \
+ --ws-client localhost:9595/salut2 \
+ --exec $R/scripts/run-parts.sh @@p @@t
+
+echo '
+##########################################################
+# true life test: run parts as in-direct client
+##########################################################
+'
+mk \
+vg \
+ --log-file=$R/valgrind.out \
+ --trace-children=no \
+ --track-fds=yes \
+ --leak-check=full \
+ --show-leak-kinds=all \
+ --num-callers=50 \
+$R/bin/afb-daemon-nocov \
--quiet \
--quiet \
--foreground \
@@ -180,6 +228,7 @@ $R/bin/afb-daemon-cov \
--workdir . \
--uploaddir . \
--rootdir . \
+ --port 8888 \
--ldpaths $R/ldpath/strong \
--binding $R/bin/demat.so \
--auto-api $R/apis/auto \
@@ -188,11 +237,14 @@ $R/bin/afb-daemon-cov \
--ws-server unix:$R/apis/ws/salut \
--ws-server localhost:9595/salut \
--exec \
- $R/bin/afb-daemon-nocov \
+ $R/bin/afb-daemon-cov \
+ --port 9999 \
+ --verbose \
+ --verbose \
--auto-api $R/apis/auto \
--auto-api $R/apis/ws \
- --ws-client localhost:@p/salut2 \
- $R/scripts/run-parts.sh @@p @@t
+ --ws-client localhost:9595/salut2 \
+ --exec $R/scripts/run-parts.sh @@p @@t
exit 0