X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2Frun_all.ksh;h=8cc578c026b4fbf6a34d5feacd13819fd6e4c573;hb=refs%2Fchanges%2F89%2F2689%2F1;hp=d779d651cd213370f016f603d861fb87dceddb94;hpb=d9de79acd9c205dc4f795e90a98331628ed6c85b;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/run_all.ksh b/test/app_test/run_all.ksh index d779d65..8cc578c 100644 --- a/test/app_test/run_all.ksh +++ b/test/app_test/run_all.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. @@ -23,13 +23,13 @@ function run_test { if [[ -n $capture_file ]] then - if ! ksh $@ >>$capture_file 2>&1 + if ! $shell $@ >>$capture_file 2>&1 then echo "[FAIL] test failed; see $capture_file" (( errors++ )) fi else - if ! ksh $@ + if ! $shell $@ then (( errors++ )) fi @@ -38,13 +38,34 @@ function run_test { build="" errors=0 +si_flag="" # eventually we'll default to -S to run SI tests over NNG tests +src_root="../.." +if [[ -d $src_root/.build ]] # look for build directory in expected places +then # run scripts will honour this + export BUILD_PATH=$src_root/.build +else + if [[ -d $src_root/build ]] + then + export BUILD_PATH=$src_root/build + fi +fi + +if whence ksh >/dev/null 2>&1 +then + shell=ksh +else + shell=bash +fi while [[ $1 == "-"* ]] do case $1 in -B) build="-B";; -e) capture_file=$2; >$capture_file; shift;; -i) installed="-i";; + -N) si_flag="";; # turn on NNG tests (off si) + -S) si_flag="-S";; # turn on si based tests + -s) shell=$2; shift;; *) echo "'$1' is not a recognised option and is ignored";; esac @@ -52,20 +73,28 @@ do shift done +export SHELL=$shell + echo "----- app --------------------" -run_test run_app_test.ksh -v $installed $build +if which ip >/dev/null 2>&1 +then + run_test run_app_test.ksh $si_flag -v $installed $build +fi echo "----- multi ------------------" -run_test run_multi_test.ksh +run_test run_multi_test.ksh $si_flag echo "----- round robin -----------" -run_test run_rr_test.ksh +run_test run_rr_test.ksh $si_flag echo "----- rts -------------------" -run_test run_rts_test.ksh -s 20 +run_test run_rts_test.ksh $si_flag -s 5 -d 100 + +echo "----- extended payload nocopy no clone------" +run_test run_exrts_test.ksh $si_flag -d 10 -n 1000 -echo "----- extended payload ------" -run_test run_exrts_test.ksh -d 10 -n 1000 +echo "----- extended payload copy clone------" +run_test run_exrts_test.ksh $si_flag -d 10 -n 1000 -c 11 if (( errors == 0 )) then