Skip to content
Snippets Groups Projects
Commit b1664455 authored by MJB's avatar MJB
Browse files

parameterised the streaming test run.sh to set run directory, uri and number of clients

parent fc5f7ce0
No related branches found
No related tags found
No related merge requests found
...@@ -24,23 +24,30 @@ ...@@ -24,23 +24,30 @@
#// #//
#///////////////////////////////////////////////////////////////////////// #/////////////////////////////////////////////////////////////////////////
if [ "$#" -ne 3 ]; then
echo "Error: illegal number of arguments: "$#
echo "Usage: run.sh TEST_RUN_DIR STREAM_URI MAX_CLIENTS"
exit
fi
# create test directories # create test directories
testfolder=$(date +%Y%m%d%H%M%S) TEST_FOLDER=$(date +%Y%m%d%H%M%S)
testrundir="/vagrant/test/run" TEST_RUN_DIR=$1
testdir=$testrundir"/streaming/"$testfolder TEST_DIR=$TEST_RUN_DIR"/streaming/"$TEST_FOLDER
echo "Test directory: "$testdir echo "Test directory: "$TEST_DIR
mkdir -p "$testdir" mkdir -p "$TEST_DIR"
# run testplan # run testplan
cd $testdir cd $TEST_DIR
#jmeter -n -LDEBUG -t /vagrant/test/streaming/testplan.jmx -l results.jtx -j jmeter.log #jmeter -n -LDEBUG -t /vagrant/test/streaming/testplan.jmx -l results.jtx -j jmeter.log
# quick bash equivalent in case Jmeter fails # quick bash equivalent in case Jmeter fails
STREAM_URI=$2
COUNTER=0 COUNTER=0
MAX=10 MAX_CLIENTS=$3
while [ $COUNTER -lt $MAX ]; do while [ $COUNTER -lt $MAX_CLIENTS ]; do
cvlc -Vdummy --no-audio http://192.168.50.11/test_video/stream.mpd &>/tmp/stdout$COUNTER & cvlc -Vdummy --no-audio $STREAM_URI &>$TEST_DIR/stdout$COUNTER &
sleep 1 sleep 1
let COUNTER=COUNTER+1 let COUNTER=COUNTER+1
done done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment