using new testOK() method

This commit is contained in:
fros4943 2008-11-05 18:20:30 +00:00
parent c42af73101
commit 773ebbc866
3 changed files with 10 additions and 19 deletions

View File

@ -5,7 +5,6 @@
<delaytime>0</delaytime>
<ticktime>1</ticktime>
<randomseed>123456</randomseed>
<nrticklists>1</nrticklists>
<motedelay>0</motedelay>
<radiomedium>
se.sics.cooja.radiomediums.UDGM
@ -16,7 +15,7 @@
</radiomedium>
<motetype>
se.sics.cooja.contikimote.ContikiMoteType
<identifier>mtype1</identifier>
<identifier>mtype2</identifier>
<description>Contiki Mote #1</description>
<contikibasedir>../../..</contikibasedir>
<contikicoredir>../../../platform/cooja</contikicoredir>
@ -62,13 +61,17 @@
</motetype>
<mote>
se.sics.cooja.contikimote.ContikiMote
<motetype_identifier>mtype1</motetype_identifier>
<motetype_identifier>mtype2</motetype_identifier>
<interface_config>
se.sics.cooja.interfaces.Position
<x>91.48300003917207</x>
<y>83.5491879028037</y>
<z>0.0</z>
</interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
<interface_config>
se.sics.cooja.contikimote.interfaces.ContikiMoteID
<id>1</id>
@ -77,10 +80,6 @@
se.sics.cooja.contikimote.interfaces.ContikiIPAddress
<ipv4address>10.10.15.14</ipv4address>
</interface_config>
<interface_config>
se.sics.cooja.interfaces.Battery
<infinite>false</infinite>
</interface_config>
</mote>
</simulation>
<plugin>

View File

@ -1 +1 @@
Cooja testapp: Hello world (single node, OS-level)
Hello world test (single node, OS-level)

View File

@ -1,13 +1,5 @@
/* Script is called once for every node log output. */
/* Input variables: Mote mote, int id, String msg. */
log.log('MOTE=' + mote + '\n');
log.log('ID=' + id + '\n');
log.log('TIME=' + mote.getSimulation().getSimulationTime() + '\n');
log.log('MSG=' + msg + '\n');
if (msg.startsWith('Hello, world')) {
log.log('TEST OK\n'); /* Report test success */
/* To increase test run speed, close the simulator when done */
mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/
log.testOK();
} else {
log.testFailed();
}