TSCH: add a regression test for tsch-packet.c
This commit is contained in:
parent
35a1701236
commit
4069ac5262
6 changed files with 715 additions and 3 deletions
27
regression-tests/25-ieee802154/js/02-tsch-packet-create.js
Normal file
27
regression-tests/25-ieee802154/js/02-tsch-packet-create.js
Normal file
|
@ -0,0 +1,27 @@
|
|||
TIMEOUT(10000, log.testFailed());
|
||||
|
||||
num_of_motes = sim.getMotesCount();
|
||||
|
||||
while(true) {
|
||||
YIELD();
|
||||
|
||||
log.log(time + " node-" + id + ": "+ msg + "\n");
|
||||
|
||||
if(msg.contains("=check-me=") == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(msg.contains("FAILED")) {
|
||||
log.testFailed();
|
||||
break;
|
||||
}
|
||||
|
||||
if(msg.contains("DONE")) {
|
||||
num_of_motes -= 1;
|
||||
if(num_of_motes == 0) {
|
||||
log.testOK();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue