X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=coverage%2Fscripts%2Frun-test.sh;fp=coverage%2Fscripts%2Frun-test.sh;h=ddf0e09d68dad26275e05ed6a04ce2e861904f05;hb=5d57096e3682083c20b2a0fd3ddb9ef75148a94e;hp=fc45515d67fa0bbe89ebb4c61e5c8af1f802f582;hpb=216666e45478353333909b6ec35374231ff75af7;p=src%2Fapp-framework-binder.git diff --git a/coverage/scripts/run-test.sh b/coverage/scripts/run-test.sh index fc45515d..ddf0e09d 100755 --- a/coverage/scripts/run-test.sh +++ b/coverage/scripts/run-test.sh @@ -21,19 +21,36 @@ vg() { fi } -mk() { +mkbefore() { echo echo "*******************************************************************" echo "** $*" echo "*******************************************************************" lcov -c -i -d $R/bin -o $R/fake.info - "$@" +} + +mkafter() { lcov -c -d $R/bin -o $R/tmp.info mv $R/lcov-out.info $R/previous.info lcov -a $R/tmp.info -a $R/previous.info -o $R/lcov-out.info rm $R/previous.info $R/fake.info $R/tmp.info } +mk() { + mkbefore "$@" + "$@" + mkafter "$@" +} + +mkdbgwait() { + mkbefore "$@" + "$@" & + sleep 1 + kill -INT %% + sleep 1 + mkafter "$@" +} + mkdir /tmp/ldpaths export AFB_LDPATHS=/tmp/ldpaths export AFB_TRACEAPI=no @@ -70,9 +87,9 @@ typeset +x LISTEN_FDNAMES LISTEN_FDS mk $R/bin/afb-daemon-cov --weak-ldpaths $R/ldpath/weak --binding $R/bin/demat.so --ws-server sd:demat --call "demat/exit:0" -AFB_DEBUG_BREAK=zero,one,two,main-start AFB_DEBUG_WAIT="here I am" +AFB_DEBUG_BREAK=zero,one,two,main-start AFB_DEBUG_WAIT="here I am,main-args" typeset -x AFB_DEBUG_BREAK AFB_DEBUG_WAIT -mk $R/bin/afb-daemon-cov --rootdir $R/i-will-never-exist +mkdbgwait $R/bin/afb-daemon-cov --rootdir $R/i-will-never-exist typeset +x AFB_DEBUG_BREAK AFB_DEBUG_WAIT mk $R/bin/afb-daemon-cov --workdir=/etc/you/should/not/be/able/to/create/me @@ -89,7 +106,7 @@ mk $R/bin/test-session mk $R/bin/test-wrap-json ########################################################## -# true life test +# true life test: run parts as direct client ########################################################## mk \ vg \ @@ -144,7 +161,7 @@ $R/bin/afb-daemon-cov \ --exec $R/scripts/run-parts.sh @p @t ########################################################## -# true life test +# true life test: run parts as in-direct client ########################################################## mk \ vg \ @@ -171,7 +188,7 @@ $R/bin/afb-daemon-cov \ --ws-server unix:$R/apis/ws/salut \ --ws-server localhost:9595/salut \ --exec \ - afb-daemon \ + $R/bin/afb-daemon-nocov \ --auto-api $R/apis/auto \ --auto-api $R/apis/ws \ --ws-client localhost:@p/salut2 \