X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2Frun_rr_test.ksh;h=d6029453058895077644ae1c5028e0b8bb1a5112;hb=e21dbee1d382e73d1897f96c0bd450f216389b74;hp=4a3fd1ceba513a0f36d1a47badf7d2ecc9a5670a;hpb=907fbf43104b1670b7374bf1a4b22096977774bf;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/run_rr_test.ksh b/test/app_test/run_rr_test.ksh index 4a3fd1c..d602945 100644 --- a/test/app_test/run_rr_test.ksh +++ b/test/app_test/run_rr_test.ksh @@ -21,7 +21,7 @@ # --------------------------------------------------------------------------------- # Mnemonic: run_multi_test.ksh # Abstract: This is a simple script to set up and run the basic send/receive -# processes for some library validation on top of nano/nng. This +# processes for some library validation on top of nng. This # particular tests starts several receivers and creates a route table # which causes messages to be sent round robin to all of the receivers. # The number of messages command line parameter (-n) will be the number @@ -31,7 +31,6 @@ # # Example command line: # ksh ./run_rr_test.ksh # default 10 messages at 1 msg/sec -# ksh ./run_rr_test.ksh -N # default but with nanomsg lib # ksh ./run_rr_test.ksh -d 100 -n 10000 # send 10k messages with 100ms delay between # # Date: 24 April 2019 @@ -44,12 +43,7 @@ # function run_sender { export RMR_RTG_SVC=8990 - if (( $nano_sender )) - then - ./sender_nano $(( nmsg * nrcvrs )) $delay $max_mtype - else - ./sender $(( nmsg * nrcvrs )) $delay $max_mtype - fi + ./sender $(( nmsg * nrcvrs )) $delay $max_mtype echo $? >/tmp/PID$$.src # must communicate state back via file b/c asynch } @@ -59,12 +53,7 @@ function run_rcvr { port=$(( 4560 + ${1:-0} )) export RMR_RTG_SVC=$(( 9990 + $1 )) - if (( $nano_receiver )) - then - ./receiver_nano $nmsg $port - else - ./receiver $nmsg $port - fi + ./receiver $nmsg $port echo $? >/tmp/PID$$.$1.rrc } @@ -109,10 +98,9 @@ fi nmsg=10 # total number of messages to be exchanged (-n value changes) delay=1000 # microsec sleep between msg 1,000,000 == 1s (shorter than others b/c/ we are sending to multiple) -nano_sender=0 # start nano version if set (-N) -nano_receiver=0 wait=1 rebuild=0 +nopull="" verbose=0 max_mtype=1 # causes all msgs to go with type 1; use -M to set up, but likely harder to validate nrcvrs=3 # this is sane, but -r allows it to be set up @@ -121,17 +109,15 @@ while [[ $1 == -* ]] do case $1 in -B) rebuild=1;; + -b) rebuild=1; nopull="nopull";; # build without pulling -d) delay=$2; shift;; -m) max_mtype=$2; shift;; - -N) nano_sender=1 - nano_receiver=1 - ;; -n) nmsg=$2; shift;; -r) nrcvrs=$2; shift;; -v) verbose=1;; *) echo "unrecognised option: $1" - echo "usage: $0 [-B] [-d micor-sec-delay] [-N] [-n num-msgs]" + echo "usage: $0 [-B] [-d micor-sec-delay] [-n num-msgs]" echo " -B forces a rebuild which will use .build" exit 1 ;; @@ -148,9 +134,8 @@ fi if (( rebuild )) then - build_path=../../.build set -e - ksh ./rebuild.ksh + ksh ./rebuild.ksh $nopull | read build_path set +e else build_path=${BUILD_PATH:-"../../.build"} # we prefer .build at the root level, but allow user option