X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Fapp_test%2Frun_all.ksh;h=1aebe03dbde9abc493a75bb0645d29c37edb9ae1;hb=6b1712a0f1c2fb37eec04b3114ce1956800f74c9;hp=ffcd3e1eb6785b9e6c79cedfe8f346c638721cd9;hpb=68d09fa5028e47e763c44c30647da31e77eda64a;p=ric-plt%2Flib%2Frmr.git diff --git a/test/app_test/run_all.ksh b/test/app_test/run_all.ksh index ffcd3e1..1aebe03 100644 --- a/test/app_test/run_all.ksh +++ b/test/app_test/run_all.ksh @@ -1,12 +1,53 @@ +#!/usr/bin/env ksh +# vim: ts=4 sw=4 noet : +#================================================================================== +# 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. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#================================================================================== +# # run all of the tests, building rmr before the first one if -B is on the command line. +function run_test { + if [[ -n $capture_file ]] + then + if ! ksh $@ >>$capture_file 2>&1 + then + echo "[FAIL] test failed; see $capture_file" + (( errors++ )) + fi + else + if ! ksh $@ + then + (( errors++ )) + fi + fi +} + build="" +errors=0 +si_flag="" # eventually we'll default to -S to run SI tests over NNG tests while [[ $1 == "-"* ]] do - case $1 in + 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 *) echo "'$1' is not a recognised option and is ignored";; esac @@ -14,8 +55,29 @@ do shift done -set -e -ksh run_app_test.ksh $build -ksh run_multi_test.ksh -ksh run_rr_test.ksh -ksh run_rts_test.ksh -s 20 +echo "----- app --------------------" +run_test run_app_test.ksh $si_flag -v $installed $build + +echo "----- multi ------------------" +run_test run_multi_test.ksh $si_flag + +echo "----- round robin -----------" +run_test run_rr_test.ksh $si_flag + +echo "----- rts -------------------" +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 copy clone------" +run_test run_exrts_test.ksh $si_flag -d 10 -n 1000 -c 11 + +if (( errors == 0 )) +then + echo "[PASS] all test pass" +else + echo "[FAIL] one or more application to application tests failed" +fi + +exit $(( !! errors ))