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 @@
#//
#/////////////////////////////////////////////////////////////////////////
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
testfolder=$(date +%Y%m%d%H%M%S)
testrundir="/vagrant/test/run"
testdir=$testrundir"/streaming/"$testfolder
echo "Test directory: "$testdir
mkdir -p "$testdir"
TEST_FOLDER=$(date +%Y%m%d%H%M%S)
TEST_RUN_DIR=$1
TEST_DIR=$TEST_RUN_DIR"/streaming/"$TEST_FOLDER
echo "Test directory: "$TEST_DIR
mkdir -p "$TEST_DIR"
# run testplan
cd $testdir
cd $TEST_DIR
#jmeter -n -LDEBUG -t /vagrant/test/streaming/testplan.jmx -l results.jtx -j jmeter.log
# quick bash equivalent in case Jmeter fails
STREAM_URI=$2
COUNTER=0
MAX=10
while [ $COUNTER -lt $MAX ]; do
cvlc -Vdummy --no-audio http://192.168.50.11/test_video/stream.mpd &>/tmp/stdout$COUNTER &
MAX_CLIENTS=$3
while [ $COUNTER -lt $MAX_CLIENTS ]; do
cvlc -Vdummy --no-audio $STREAM_URI &>$TEST_DIR/stdout$COUNTER &
sleep 1
let COUNTER=COUNTER+1
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment