X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?p=src%2Fapp-framework-binder.git;a=blobdiff_plain;f=stress-server.sh;h=643c8990c88f3d42d8c10f552689a1c719cfb3fb;hp=16a376e3e9157093f5483e938dedf92b65aa103a;hb=refs%2Fheads%2Fsandbox%2FDDTLK%2Fpakage;hpb=237cf9c6c05616c20726175406d0855a8d0d4233 diff --git a/stress-server.sh b/stress-server.sh index 16a376e3..643c8990 100755 --- a/stress-server.sh +++ b/stress-server.sh @@ -1,25 +1,38 @@ #!/bin/bash ROOT=$(dirname $0) +cd ${ROOT:-.} +ROOT=$(pwd) echo ROOT=$ROOT -AFB=$ROOT/build/src/afb-daemon +AFB=build/src/afb-daemon HELLO=build/bindings/samples/helloWorld.so PORT=12345 TEST=test -TOKEN=knock-knock-knoc -OUT=$ROOT/stress-out-server +TOKEN=knock-knock-knock +OUT=stress-out-server rm $OUT* -ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO" +case "$1" in + --ws) + shift + ARGS="-q --no-ldpaths --binding=$HELLO --session-max=100 --ws-server=unix:@afw:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --no-ldpaths --roothttp=$TEST --token=$TOKEN --ws-client=unix:@afw:hello " +# ARGS="$ARGS -vvv --tracereq=all" + ;; + *) + ARGS="-q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO" + ;; +esac + +echo $AFB $ARGS $@ echo -n launch afb... case "$1" in - gdb) gdb $AFB -ex "run $ARGS";; - valgrind) valgrind --leak-check=full $AFB $ARGS 2>&1 | tee $OUT;; - strace) strace -tt -f -o $OUT.strace $AFB $ARGS 2>&1 | tee $OUT;; - *) $AFB $ARGS 2>&1 | tee $OUT;; + gdb) shift; gdb $AFB -ex "run $ARGS $@";; + valgrind) shift; valgrind --leak-check=full $AFB $ARGS $@ 2>&1 | tee $OUT;; + strace) shift; strace -tt -f -o $OUT.strace $AFB $ARGS $@ 2>&1 | tee $OUT;; + *) $AFB $ARGS $@ 2>&1 | tee $OUT;; esac #$AFB -q --session-max=100 --port=$PORT --workdir=$ROOT --roothttp=$TEST --token=$TOKEN --ldpaths=/tmp --binding=$HELLO > $OUT.0 2>&1 & #afbpid=$!