X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=test%2Fapp_test%2Frun_rr_test.ksh;h=62aae3b5e0cbca6d6ab76b43255a68537a073d36;hb=refs%2Ftags%2F3.3.0;hp=329d59faa1e3f0670868dc0cc17c113825371c3f;hpb=d9de79acd9c205dc4f795e90a98331628ed6c85b;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 329d59f..62aae3b 100644 --- a/test/app_test/run_rr_test.ksh +++ b/test/app_test/run_rr_test.ksh @@ -1,8 +1,8 @@ #!/usr/bin/env ksh # vim: ts=4 sw=4 noet : #================================================================================== -# Copyright (c) 2019 Nokia -# Copyright (c) 2018-2019 AT&T Intellectual Property. +# Copyright (c) 2019-2020 Nokia +# Copyright (c) 2018-2020 AT&T Intellectual Property. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -43,7 +43,7 @@ # function run_sender { export RMR_RTG_SVC=8990 - ./sender $(( nmsg * nrcvrs )) $delay $max_mtype + ./sender${si} $(( nmsg * nrcvrs )) $delay $max_mtype echo $? >/tmp/PID$$.src # must communicate state back via file b/c asynch } @@ -53,7 +53,7 @@ function run_rcvr { port=$(( 4560 + ${1:-0} )) export RMR_RTG_SVC=$(( 9990 + $1 )) - ./receiver $nmsg $port + ./receiver${si} $nmsg $port echo $? >/tmp/PID$$.$1.rrc } @@ -105,6 +105,8 @@ 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 +force_make=0 +si="" while [[ $1 == -* ]] do @@ -113,13 +115,18 @@ do -b) rebuild=1; nopull="nopull";; # build without pulling -d) delay=$2; shift;; -m) max_mtype=$2; shift;; + -M) force_make=1;; -n) nmsg=$2; shift;; + -N) si="";; # build/run NNG binaries -r) nrcvrs=$2; shift;; + -S) si="_si";; # build/run SI95 binaries -v) verbose=1;; *) echo "unrecognised option: $1" - echo "usage: $0 [-B] [-d micor-sec-delay] [-n num-msgs]" + echo "usage: $0 [-B] [-d micor-sec-delay] [-M] [-n num-msgs] [-S]" echo " -B forces a rebuild which will use .build" + echo " -M force test applications to be remade" + echo " -S build/test SI95 based binaries" exit 1 ;; esac @@ -136,7 +143,7 @@ fi if (( rebuild )) then set -e - ksh ./rebuild.ksh $nopull | read build_path + $SHELL ./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 @@ -151,20 +158,20 @@ fi if [[ -d $build_path/lib64 ]] then - export LD_LIBRARY_PATH=$build_path:$build_path/lib64 + export LD_LIBRARY_PATH=$build_path:$build_path/lib64:$LD_LIBRARY_PATH else - export LD_LIBRARY_PATH=$build_path:$build_path/lib + export LD_LIBRARY_PATH=$build_path:$build_path/lib:$LD_LIBRARY_PATH fi export LIBRARY_PATH=$LD_LIBRARY_PATH export RMR_SEED_RT=./rr.rt set_rt $nrcvrs -if [[ ! -f ./sender ]] +if (( rebuild || force_make )) || [[ ! -f ./sender${si} || ! -f ./receiver${si} ]] then if ! make >/dev/null 2>&1 then - echo "[FAIL] cannot find sender binary, and cannot make it.... humm?" + echo "[FAIL] cannot find sender${si} and/or receiver${si} binary, and cannot make them.... humm?" exit 1 fi fi