]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Add a script to run the tests and add some text in the README about it.
authorrazvanm <razvanm>
Fri, 27 Jun 2008 00:40:44 +0000 (00:40 +0000)
committerrazvanm <razvanm>
Fri, 27 Jun 2008 00:40:44 +0000 (00:40 +0000)
apps/tests/TestSimComm/README
apps/tests/TestSimComm/run [new file with mode: 0755]

index 4b632d9d56d1548a5af65c4a2423c712d1e7c083..5780b33c299a1d42afbe006f7428635ffdbc837e 100644 (file)
@@ -29,5 +29,30 @@ quality links (-60 dBm) to node 2, but the reverse links (2 to 1 and
 2 to 3) are much worse (-80 dBm). You should see packet deliveries
 like test-equal.py but few acknowledgements.
 
+The ./run script runs all the three tests and counts the number of
+ACKed and non-ACKed send packets. The output look like this:
+
+test-asym.log
+           ACK           NOACK   total
+         1 4930          35923   40853
+         3 4983          35870   40853
+test-equal.log
+           ACK           NOACK   total
+         1 21197         19666   40863
+         3 21320         19543   40863
+test-unequal.log
+           ACK           NOACK   total
+         1 27619         12966   40585
+         3 21040         19545   40585
+
+This output shows several this:
+- the number of ACKs in the asymmetric links case is much less than in
+  the equal case which proves the fact that the reverse links are indeed
+  poor.
+- in the unequal case the number on ACKs for node 1 is higher than
+  node 3 which is expected because node 1 has a better link to 2 than 3.
+- in the equal case both nodes perform similar, each of them loosing
+  about half of their packets.
+
 Philip Levis
 
diff --git a/apps/tests/TestSimComm/run b/apps/tests/TestSimComm/run
new file mode 100755 (executable)
index 0000000..d1720ee
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+make micaz sim
+
+for t in test*.py
+do
+ echo Running $t...
+ python $t > `basename $t .py`.log
+done
+
+make clean
+
+for l in test*.log
+do
+    echo $l
+    echo -e '\t   ACK \t\t NOACK \t total'
+    for i in 1 3
+    do
+       N1=`grep 'Send completed' $l | grep ' ACK' | grep "($i)" | wc -l`
+       N2=`grep 'Send completed' $l | grep 'NOACK' | grep "($i)" | wc -l`
+       echo -e "\t $i $N1 \t $N2 \t" `expr $N1 + $N2`
+    done
+done
+