From: Richard Whitehouse Date: Mon, 18 Apr 2011 13:18:58 +0000 (+0100) Subject: Add script to run tests X-Git-Url: https://git.richardwhiuk.com/?a=commitdiff_plain;h=af1ea055db77b9eb0d492f6a7f45f9549ec4145f;p=ii-simulations.git Add script to run tests --- diff --git a/run b/run new file mode 100755 index 0000000..28c7fc5 --- /dev/null +++ b/run @@ -0,0 +1,31 @@ +#!/bin/bash + +function runtests { + pushd . + cd "`dirname "$0"`" + for testno in * + do + if [ -d $testno ]; then + runtest $testno + fi + done; + popd +} + +function runtest { + pushd . + cd ../code/ + _runtest $1 ethernet + _runtest $1 moose + popd +} + +function _runtest { + mkdir -p ../simulations/$1/$2 + ./waf --run "simulation --network=../simulations/$1/topology --data=../simulations/$1/data --csma=../simulations/$1/$2/csma --ip=../simulations/$1/$2/ip --pcap=../simulations/$1/$2/pcap --link=$2" +} + +# Tests + +runtests +