X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2Frun_exrts_test.ksh;h=58913b4b7cdca5f95534c6a31907619e874d4b77;hb=refs%2Fchanges%2F25%2F2325%2F2;hp=08807fc5d95885c851ff73e9fba268aefb65678f;hpb=d9de79acd9c205dc4f795e90a98331628ed6c85b;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/run_exrts_test.ksh b/test/app_test/run_exrts_test.ksh index 08807fc..58913b4 100644 --- a/test/app_test/run_exrts_test.ksh +++ b/test/app_test/run_exrts_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. @@ -36,12 +36,13 @@ # Author: E. Scott Daniels # --------------------------------------------------------------------------------- +ulimit -c unlimited # The sender and receivers are run asynch. Their exit statuses are captured in a # file in order for the 'main' to pick them up easily. # function run_sender { - ./v_sender ${nmsg:-10} ${delay:-100000} ${mtype_start_stop:-0:1} + ./v_sender${si} ${nmsg:-10} ${delay:-100000} ${mtype_start_stop:-0:1} echo $? >/tmp/PID$$.src # must communicate state back via file b/c asynch } @@ -51,7 +52,7 @@ function run_rcvr { port=$(( 4460 + ${1:-0} )) export RMR_RTG_SVC=$(( 9990 + $1 )) - ./ex_rts_receiver $port + ./ex_rts_receiver${si} $copyclone -p $port echo $? >/tmp/PID$$.$1.rrc } @@ -104,27 +105,32 @@ verbose=0 nrcvrs=1 # this is sane, but -r allows it to be set up use_installed=0 mtype_start_stop="" +si="" # -S will enable si library testing while [[ $1 == -* ]] do case $1 in - -c) cthreads=$2; shift;; + -c) copyclone="-c $2"; shift;; -B) rebuild=1;; -d) delay=${2//,/}; shift;; # delay in micro seconds allow 1,000 to make it easier on user -i) use_installed=1;; -m) mtype_start_stop="$2"; shift;; - -M) mt_call="EX_CFLAGS=-DMTC=1";; # turn on mt-call receiver option + -M) mt_call_flag="EX_CFLAGS=-DMTC=1";; # turn on mt-call receiver option + -N) si="";; # enable nng based testing -n) nmsg=$2; shift;; -r) nrcvrs=$2; shift;; + -S) si="_si";; # run SI95 based binaries -v) verbose=1;; *) echo "unrecognised option: $1" - echo "usage: $0 [-B] [-c caller-threads] [-d micor-sec-delay] [-i] [-M] [-m mtype] [-n num-msgs] [-r num-receivers] [-v]" + echo "usage: $0 [-B] [-c caller-threads] [-d micor-sec-delay] [-i] [-M] [-m mtype] [-n num-msgs] [-r num-receivers] [-S] [-v]" echo " -B forces a rebuild which will use .build" echo " -i will use installed libraries (/usr/local) and cause -B to be ignored if supplied)" echo " -m mtype will set the stopping (max) message type; sender will loop through 0 through mtype-1" echo " -m start:stop will set the starting and stopping mtypes; start through stop -1" echo " -M enables mt-call receive processing to test the RMR asynch receive pthread" + echo " -N enables NNG based testing (default)" + echo " -S enables SI95 based testing" echo "" echo "The receivers will run until they have not received a message for a few seconds. The" echo "sender will send the requested number of messages, 10 by default." @@ -177,7 +183,7 @@ export RMR_SEED_RT=./ex_rts.rt set_rt $nrcvrs # set up the rt for n receivers -if ! make $mt_call -B v_sender ex_rts_receiver >/tmp/PID$$.log 2>&1 # for sanity, always rebuild test binaries +if ! make -B $mt_call_flag v_sender${si} ex_rts_receiver${si} >/tmp/PID$$.log 2>&1 # for sanity, always rebuild test binaries then echo "[FAIL] cannot make binaries" cat /tmp/PID$$.log