TT#81700 obey profile if selected via parameters

* only try to autodetect if parameter is empty

Change-Id: I6297788dbb9faf58eb976b3bd50eb876765c8e1b
changes/81/41981/1
Victor Seva 6 years ago
parent 1de175486b
commit 1f1b200b9c

@ -1,12 +1,12 @@
#!/bin/bash
SKIP_CONFIG=false
PROFILE="${PROFILE:-CE}"
PROFILE="${PROFILE:-}"
GROUP="${GROUP:-scenarios}"
usage() {
echo "Usage: bench.sh [-p PROFILE] [-C] [num_runs]"
echo "Options:"
echo -e "\\t-p CE|PRO default is CE"
echo -e "\\t-p CE|PRO default is autodetect"
echo -e "\\t-C skips configuration of the environment"
echo -e "\\t-x set GROUP scenario. Default: scenarios"
echo -e "\\t-h this help"
@ -24,6 +24,7 @@ while getopts 'hCp:x:' opt; do
done
shift $((OPTIND - 1))
if [ -z "${PROFILE}" ] ; then
ngcp_type=$(command -v ngcp-type)
if [ -n "${ngcp_type}" ]; then
case $(${ngcp_type}) in
@ -33,6 +34,7 @@ if [ -n "${ngcp_type}" ]; then
esac
echo "ngcp-type: profile ${PROFILE}"
fi
fi
if [ "${PROFILE}" != "CE" ] && [ "${PROFILE}" != "PRO" ]; then
echo "PROFILE ${PROFILE} unknown"
usage

@ -2,7 +2,7 @@
RUN_DIR="$(dirname "$0")"
export BASE_DIR=${BASE_DIR:-$RUN_DIR}
BIN_DIR="${BASE_DIR}/bin"
PROFILE="${PROFILE:-CE}"
PROFILE="${PROFILE:-}"
DOMAIN="spce.test"
GROUP="${GROUP:-scenarios}"
RETRANS=""
@ -10,7 +10,7 @@ CDR=""
usage() {
echo "Usage: get_results.sh [-p PROFILE] [-h] [-g]"
echo -e "\\t-p CE|PRO default is CE"
echo -e "\\t-p CE|PRO default is autodetect"
echo -e "\\t-g generate png flow graphs if test fails"
echo -e "\\t-G generate png all flow graphs"
echo -e "\\t-h this help"
@ -79,6 +79,7 @@ if [[ $# -ne 0 ]]; then
exit 1
fi
if [ -z "${PROFILE}" ] ; then
ngcp_type=$(command -v ngcp-type)
if [ -n "${ngcp_type}" ]; then
case $(${ngcp_type}) in
@ -88,6 +89,7 @@ if [ -n "${ngcp_type}" ]; then
esac
echo "ngcp-type: profile ${PROFILE}"
fi
fi
if [ "${PROFILE}" != "CE" ] && [ "${PROFILE}" != "PRO" ]; then
echo "PROFILE ${PROFILE} unknown"
usage

@ -15,7 +15,7 @@ RTP_LOG=${RTP_LOG:-"/var/log/ngcp/rtp.log"}
TMP_LOG_DIR="/tmp"
KAM_DIR="/tmp/cfgtest"
COREDUMP_DIR="/ngcp-data/coredumps"
PROFILE="${PROFILE:-CE}"
PROFILE="${PROFILE:-}"
OPTS=(-P -T -M) #SKIP_PARSE=true, SKIP_TESTS=true, SKIP_MOVE_JSON_KAM=true
DOMAIN="spce.test"
TIMEOUT=${TIMEOUT:-300}
@ -223,7 +223,7 @@ cdr_export() {
usage() {
echo "Usage: run_test.sh [-p PROFILE] [-C] [-t]"
echo "Options:"
echo -e "\\t-p CE|PRO default is CE"
echo -e "\\t-p CE|PRO default is autodetect"
echo -e "\\t-l print available SCENARIOS in GROUP"
echo -e "\\t-C skips configuration of the environment"
echo -e "\\t-K capture messages with tcpdump"
@ -267,6 +267,7 @@ if "${SHOW_SCENARIOS}" ; then
exit 0
fi
if [ -z "${PROFILE}" ]; then
ngcp_type=$(command -v ngcp-type)
if [ -n "${ngcp_type}" ]; then
case $(${ngcp_type}) in
@ -276,7 +277,7 @@ if [ -n "${ngcp_type}" ]; then
esac
echo "ngcp-type: profile ${PROFILE}"
fi
fi
if [ "${PROFILE}" != "CE" ] && [ "${PROFILE}" != "PRO" ]; then
echo "PROFILE ${PROFILE} unknown"
usage

Loading…
Cancel
Save