From 242d8edf0363b6d0fac84a048f57cfa94f484b1f Mon Sep 17 00:00:00 2001 From: fros4943 Date: Fri, 26 Jun 2009 11:30:36 +0000 Subject: [PATCH] more debugging output when test fails --- .../contiki_tests/sky_shell_exec_serial.csc | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/cooja/contiki_tests/sky_shell_exec_serial.csc b/tools/cooja/contiki_tests/sky_shell_exec_serial.csc index ca07104d0..dc06f1f87 100644 --- a/tools/cooja/contiki_tests/sky_shell_exec_serial.csc +++ b/tools/cooja/contiki_tests/sky_shell_exec_serial.csc @@ -148,13 +148,21 @@ log.log("Starting hello world\n"); GENERATE_MSG(500, "continue"); YIELD_THEN_WAIT_UNTIL(msg.equals("continue")); write(mote, "exec hello-world.ce\n"); -WAIT_UNTIL(msg.contains("OK")); -log.log("> ELF loader returned OK\n"); -WAIT_UNTIL(msg.contains("Hello, world")); -log.log("> Hello world process started\n"); - -log.log("Finished!\n"); -log.testOK(); +while (true) { + YIELD(); + if (msg.contains("OK")) { + log.log("> ELF loader returned OK\n"); + } + if (msg.contains("Hello, world")) { + log.log("> Hello world process started\n"); + log.testOK(); + } + if (msg.contains("Symbol not found")) { + log.log("> ELF loader error: " + msg +"\n"); + log.testFailed(); + } +} + true 600