diff options
-rwxr-xr-x | coverage/scripts/00-trace.sh | 2 | ||||
-rwxr-xr-x | coverage/scripts/run-test.sh | 60 | ||||
-rwxr-xr-x | mkbuild.sh | 35 |
3 files changed, 92 insertions, 5 deletions
diff --git a/coverage/scripts/00-trace.sh b/coverage/scripts/00-trace.sh index 247be611..1838094b 100755 --- a/coverage/scripts/00-trace.sh +++ b/coverage/scripts/00-trace.sh @@ -1,6 +1,6 @@ #!/bin/sh -$R/bin/afb-client -k $WSURL <<EOC & +$R/bin/afb-client -s -k $WSURL <<EOC & monitor trace {"add":{"tag":"fun","api":"*","request":"*","event":"*","session":"*","global":"*"}} monitor trace {"add":{"tag":"T","api":"!(monitor)","request":"*","event":"*","session":"*","global":"*"}} monitor trace {"add":{"tag":"T","api":"monitor","request":"none"}} 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 diff --git a/mkbuild.sh b/mkbuild.sh new file mode 100755 index 00000000..3ca523e7 --- /dev/null +++ b/mkbuild.sh @@ -0,0 +1,35 @@ +#/bin/sh + +h="$(dirname $0)" + +mkdir -p "$h/build" || exit +cd "$h/build" || exit + +[ "$1" = "-f" ] && { rm -r * 2>/dev/null; shift; } +[ "$1" = "--force" ] && { rm -r * 2>/dev/null; shift; } + +cmake \ + -DCMAKE_BUILD_TYPE=Debug \ + -DCMAKE_INSTALL_PREFIX=~/.local \ + -DAGL_DEVEL=ON \ + -DWITH_SUPERVISOR=ON \ + -DWITH_DBUS_TRANSPARENCY=ON \ + -DWITH_LEGACY_BINDING_V1=ON \ + -DWITH_LEGACY_BINDING_V2=ON \ + -DWITH_LEGACY_BINDING_VDYN=ON \ + -DWITH_DYNAMIC_BINDING=ON \ + -DWITH_SIG_MONITOR_DUMPSTACK=ON \ + -DWITH_SIG_MONITOR_SIGNALS=ON \ + -DWITH_SIG_MONITOR_FOR_CALL=ON \ + -DWITH_SIG_MONITOR_TIMERS=ON \ + -DWITH_AFB_HOOK=ON \ + -DWITH_AFB_TRACE=ON \ + -DINCLUDE_MONITORING=ON \ + -DINCLUDE_SUPERVISOR=ON \ + -DINCLUDE_DBUS_TRANSPARENCY=ON \ + -DINCLUDE_LEGACY_BINDING_V1=ON \ + -DINCLUDE_LEGACY_BINDING_VDYN=ON \ + .. + +make -j "$@" + |