--- /dev/null
+#!/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
+