using new testOK() method
This commit is contained in:
parent
c42af73101
commit
773ebbc866
3 changed files with 10 additions and 19 deletions
|
@ -5,7 +5,6 @@
|
||||||
<delaytime>0</delaytime>
|
<delaytime>0</delaytime>
|
||||||
<ticktime>1</ticktime>
|
<ticktime>1</ticktime>
|
||||||
<randomseed>123456</randomseed>
|
<randomseed>123456</randomseed>
|
||||||
<nrticklists>1</nrticklists>
|
|
||||||
<motedelay>0</motedelay>
|
<motedelay>0</motedelay>
|
||||||
<radiomedium>
|
<radiomedium>
|
||||||
se.sics.cooja.radiomediums.UDGM
|
se.sics.cooja.radiomediums.UDGM
|
||||||
|
@ -16,7 +15,7 @@
|
||||||
</radiomedium>
|
</radiomedium>
|
||||||
<motetype>
|
<motetype>
|
||||||
se.sics.cooja.contikimote.ContikiMoteType
|
se.sics.cooja.contikimote.ContikiMoteType
|
||||||
<identifier>mtype1</identifier>
|
<identifier>mtype2</identifier>
|
||||||
<description>Contiki Mote #1</description>
|
<description>Contiki Mote #1</description>
|
||||||
<contikibasedir>../../..</contikibasedir>
|
<contikibasedir>../../..</contikibasedir>
|
||||||
<contikicoredir>../../../platform/cooja</contikicoredir>
|
<contikicoredir>../../../platform/cooja</contikicoredir>
|
||||||
|
@ -62,13 +61,17 @@
|
||||||
</motetype>
|
</motetype>
|
||||||
<mote>
|
<mote>
|
||||||
se.sics.cooja.contikimote.ContikiMote
|
se.sics.cooja.contikimote.ContikiMote
|
||||||
<motetype_identifier>mtype1</motetype_identifier>
|
<motetype_identifier>mtype2</motetype_identifier>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.interfaces.Position
|
se.sics.cooja.interfaces.Position
|
||||||
<x>91.48300003917207</x>
|
<x>91.48300003917207</x>
|
||||||
<y>83.5491879028037</y>
|
<y>83.5491879028037</y>
|
||||||
<z>0.0</z>
|
<z>0.0</z>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
|
<interface_config>
|
||||||
|
se.sics.cooja.interfaces.Battery
|
||||||
|
<infinite>false</infinite>
|
||||||
|
</interface_config>
|
||||||
<interface_config>
|
<interface_config>
|
||||||
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
se.sics.cooja.contikimote.interfaces.ContikiMoteID
|
||||||
<id>1</id>
|
<id>1</id>
|
||||||
|
@ -77,10 +80,6 @@
|
||||||
se.sics.cooja.contikimote.interfaces.ContikiIPAddress
|
se.sics.cooja.contikimote.interfaces.ContikiIPAddress
|
||||||
<ipv4address>10.10.15.14</ipv4address>
|
<ipv4address>10.10.15.14</ipv4address>
|
||||||
</interface_config>
|
</interface_config>
|
||||||
<interface_config>
|
|
||||||
se.sics.cooja.interfaces.Battery
|
|
||||||
<infinite>false</infinite>
|
|
||||||
</interface_config>
|
|
||||||
</mote>
|
</mote>
|
||||||
</simulation>
|
</simulation>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Cooja testapp: Hello world (single node, OS-level)
|
Hello world test (single node, OS-level)
|
||||||
|
|
|
@ -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')) {
|
if (msg.startsWith('Hello, world')) {
|
||||||
log.log('TEST OK\n'); /* Report test success */
|
log.testOK();
|
||||||
/* To increase test run speed, close the simulator when done */
|
} else {
|
||||||
mote.getSimulation().getGUI().doQuit(false); /* Quit simulator (to end test run)*/
|
log.testFailed();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue