From 35065ca3a59d327e68b18b5cf2080fb940b6ee4d Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 15 Oct 2018 18:14:29 +0200 Subject: Improved test widget launcher script Improved test widget launcher script which calls verb synchronously and therefore we can correctly detect the end of the test session and exit. Bug-AGL: SPEC-1821 Change-Id: I76b777770403ad9afcc72faeeb50188f52fe1223 Signed-off-by: Romain Forlot --- test-widget/launcher.sh.in | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/test-widget/launcher.sh.in b/test-widget/launcher.sh.in index 005c433..7414a7b 100644 --- a/test-widget/launcher.sh.in +++ b/test-widget/launcher.sh.in @@ -34,27 +34,17 @@ declare -a testVerb if [[ $(jq '.testVerb|type' $CFGFILE) == "array" ]] then - testVerbLength=$(jq '.testVerb | length') - for (( idx=0; idx $AFBCLIENTOUT 2>&1 & -CLIENTPID=$! - testVerbLength=${#testVerb[@]} for (( idx=0; idx $AFBCLIENTIN + afb-client-demo -s ws://localhost:${PORT}/api?token=${TOKEN} "$API" "${testVerb[$idx]}" done -while read -r line -do - [ "$(echo "${line}" | grep -E 'Ran [[:digit:]]+ tests in')" ] && break -done < $AFBCLIENTOUT - -rm -f $AFBCLIENTIN -rm -f $AFBCLIENTOUT -kill $CLIENTPID +afb-client-demo ws://localhost:${PORT}/api?token=${TOKEN} "$API" "exit" -- cgit 1.2.3-korg