summaryrefslogtreecommitdiffstats
path: root/stress-server.sh
blob: 09d06c44795bbc6cbbfd84336352afcaff13f55a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

ROOT=$(dirname $0)
cd ${ROOT:-.}
ROOT=$(pwd)
echo ROOT=$ROOT

AFB=build/src/afb-daemon
HELLO=build/bindings/samples/helloWorld.so
PORT=12345
TEST=test
TOKEN=knock-knock-knock
OUT=stress-out-server

rm $OUT*

case "$1" in
 --ws)
  shift
  ARGS="-q --ldpaths=/tmp --binding=$HELLO --session-max=100 --ws-server=unix:@afw:hello --no-httpd --exec $AFB --session-max=100 --port=$PORT --ldpaths=/tmp --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) 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=$!
#strace -tt -f -o $OUT-strace.0 -p $afbpid &
wait
use_gold=false', d), d)}" # Toolchains we will use for the build. We need to point to the toolchain file # we've created, set the right target architecture and make sure we are not # using Chromium's toolchain (bundled clang, bundled binutils etc). GN_ARGS += "\ host_toolchain=\"//build/toolchain/cros:host\" \ cros_host_is_clang=false \ use_custom_libcxx_for_host=false \ cros_host_ar=\"${BUILD_AR}\" \ cros_host_cc=\"${BUILD_CC} ${BUILD_CFLAGS}\" \ cros_host_cxx=\"${BUILD_CXX} ${BUILD_CXXFLAGS}\" \ cros_host_extra_ldflags=\"${BUILD_LDFLAGS}\" \ custom_toolchain=\"//build/toolchain/cros:target\" \ is_clang=false \ use_custom_libcxx=false \ target_cpu=\"${@gn_arch_name('${TUNE_ARCH}')}\" \ cros_target_ar=\"${AR}\" \ cros_target_cc=\"${CC}\" \ cros_target_cxx=\"${CXX}\" \ cros_target_extra_ldflags=\"${LDFLAGS}\" \ v8_snapshot_toolchain=\"//build/toolchain/cros:v8_snapshot\" \ cros_v8_snapshot_is_clang=false \ cros_v8_snapshot_ar=\"${BUILD_AR}\" \ cros_v8_snapshot_cc=\"${BUILD_CC}\" \ cros_v8_snapshot_cxx=\"${BUILD_CXX}\" \ gold_path=\"\" \ v8_enable_embedded_builtins=false \ use_v8_context_snapshot=false \ " GN_ARGS:append = " \ ozone_platform_wayland_external=false \ ozone_platform_wayland=true \ use_system_libwayland=true \ use_system_wayland_scanner=false \ use_system_minigbm=false \ use_wayland_gbm=false \ " GN_ARGS:append = " \ is_webos=false \ is_agl=true \ " # TODO: drop this after we migrate to ubuntu 16.04 or above GN_ARGS += "\ fatal_linker_warnings=false\ " # TODO(rzanoni) copied from original recipe to fix qemux86 build. # check if it can be removed in the future. PACKAGECONFIG:remove:qemux86 = "gstreamer umediaserver neva-media gav neva-webrtc" #END TODO