Added support for the FTP standalone client to the c64 target.
[contiki-2.x.git] / tools / cooja / contiki_tests / sky_checkpointing.csc
blob55c654f0903c99f87d3957ffc70aa3e26693c050
1 <?xml version="1.0" encoding="UTF-8"?>
2 <simconf>
3 <project>../apps/mrm</project>
4 <project>../apps/mspsim</project>
5 <project>../apps/avrora</project>
6 <project>../apps/native_gateway</project>
7 <simulation>
8 <title>My simulation</title>
9 <delaytime>0</delaytime>
10 <randomseed>generated</randomseed>
11 <motedelay_us>1000000</motedelay_us>
12 <radiomedium>
13 se.sics.cooja.radiomediums.UDGM
14 <transmitting_range>50.0</transmitting_range>
15 <interference_range>100.0</interference_range>
16 <success_ratio_tx>1.0</success_ratio_tx>
17 <success_ratio_rx>1.0</success_ratio_rx>
18 </radiomedium>
19 <motetype>
20 se.sics.cooja.mspmote.SkyMoteType
21 <identifier>sky1</identifier>
22 <description>Sky Mote Type #1</description>
23 <source>../../../examples/sky-shell/sky-checkpoint.c</source>
24 <commands>make clean TARGET=sky
25 make sky-checkpoint.sky TARGET=sky</commands>
26 <firmware>../../../examples/sky-shell/sky-checkpoint.sky</firmware>
27 <moteinterface>se.sics.cooja.interfaces.Position</moteinterface>
28 <moteinterface>se.sics.cooja.interfaces.IPAddress</moteinterface>
29 <moteinterface>se.sics.cooja.interfaces.Mote2MoteRelations</moteinterface>
30 <moteinterface>se.sics.cooja.mspmote.interfaces.MspClock</moteinterface>
31 <moteinterface>se.sics.cooja.mspmote.interfaces.MspMoteID</moteinterface>
32 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyButton</moteinterface>
33 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyFlash</moteinterface>
34 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyByteRadio</moteinterface>
35 <moteinterface>se.sics.cooja.mspmote.interfaces.SkySerial</moteinterface>
36 <moteinterface>se.sics.cooja.mspmote.interfaces.SkyLED</moteinterface>
37 </motetype>
38 <mote>
39 se.sics.cooja.mspmote.SkyMote
40 <motetype_identifier>sky1</motetype_identifier>
41 <breakpoints />
42 <interface_config>
43 se.sics.cooja.interfaces.Position
44 <x>3.537694077190867</x>
45 <y>25.877706916818877</y>
46 <z>0.0</z>
47 </interface_config>
48 <interface_config>
49 se.sics.cooja.mspmote.interfaces.MspMoteID
50 <id>1</id>
51 </interface_config>
52 </mote>
53 </simulation>
54 <plugin>
55 se.sics.cooja.plugins.SimControl
56 <width>248</width>
57 <z>3</z>
58 <height>200</height>
59 <location_x>0</location_x>
60 <location_y>0</location_y>
61 <minimized>false</minimized>
62 </plugin>
63 <plugin>
64 se.sics.cooja.plugins.Visualizer
65 <plugin_config>
66 <skin>Mote IDs</skin>
67 <skin>Radio environment (UDGM)</skin>
68 </plugin_config>
69 <width>246</width>
70 <z>2</z>
71 <height>210</height>
72 <location_x>2</location_x>
73 <location_y>199</location_y>
74 <minimized>false</minimized>
75 </plugin>
76 <plugin>
77 se.sics.cooja.plugins.LogListener
78 <plugin_config>
79 <filter />
80 </plugin_config>
81 <width>849</width>
82 <z>1</z>
83 <height>246</height>
84 <location_x>0</location_x>
85 <location_y>409</location_y>
86 <minimized>false</minimized>
87 </plugin>
88 <plugin>
89 se.sics.cooja.plugins.ScriptRunner
90 <plugin_config>
91 <script>TIMEOUT(360000, log.log("timeout at phase " + phase + ". last message: " + msg + "\n"));
92 phase=0;
94 /* Wait until node has booted */
95 WAIT_UNTIL(msg.startsWith('Starting'));
96 log.log("Shell started\n");
97 phase++;
99 /* 1. BACKGROUND PROCESS - NO CHECKPOINTING */
100 write(mote, "repeat 10 1 echo bg process &amp;\n");
101 log.log("Starting background process without checkpointing\n");
102 expected=10;
103 while (expected &gt; 0) {
104 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
105 expected--;
108 /* Make sure background process has exited */
109 GENERATE_MSG(3000, "continue");
110 while (!msg.contains('continue')) {
111 YIELD();
112 if (msg.contains('bg process')) {
113 log.log("Too many bg messages at phase: " + phase + "\n");
114 log.testFailed(); /* We are done! */
115 while (true) YIELD();
118 log.log("Background process without checkpointing done\n\n");
119 phase++;
121 /* 2. BACKGROUND PROCESS - CHECKPOINTING EVERY SECOND */
122 write(mote, "repeat 10 1 echo bg process &amp;\n");
123 log.log("Starting background process with periodic checkpointing\n");
124 expected=10;
125 while (expected &gt; 0) {
126 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
127 expected--;
128 write(mote, "checkpoint file" + expected + "\n");
129 log.log("&gt; checkpoint file" + expected + "\n");
132 /* Make sure background process has exited */
133 GENERATE_MSG(3000, "continue");
134 while (!msg.contains('continue')) {
135 YIELD();
136 if (msg.contains('bg process')) {
137 log.log("Too many bg messages at phase: " + phase + "\n");
138 log.testFailed(); /* We are done! */
139 while (true) YIELD();
142 log.log("Background process with periodic checkpointing done\n\n");
143 phase++;
145 /* 3. LIST ALL FILES */
146 write(mote, "ls");
147 YIELD_THEN_WAIT_UNTIL(msg.contains('file9'));
148 YIELD_THEN_WAIT_UNTIL(msg.contains('file8'));
149 YIELD_THEN_WAIT_UNTIL(msg.contains('file7'));
150 YIELD_THEN_WAIT_UNTIL(msg.contains('file6'));
151 YIELD_THEN_WAIT_UNTIL(msg.contains('file5'));
152 YIELD_THEN_WAIT_UNTIL(msg.contains('file4'));
153 YIELD_THEN_WAIT_UNTIL(msg.contains('file3'));
154 YIELD_THEN_WAIT_UNTIL(msg.contains('file2'));
155 YIELD_THEN_WAIT_UNTIL(msg.contains('file1'));
156 YIELD_THEN_WAIT_UNTIL(msg.contains('file0'));
157 GENERATE_MSG(1000, "continue");
158 YIELD_THEN_WAIT_UNTIL(msg.contains('continue'));
159 log.log("All checkpoints are stored in the filesystem\n\n");
160 phase++;
162 /* 4. ROLLBACK TO RESTORE BACKGROUND PROCESS */
163 write(mote, "rollback file7");
164 log.log("Rolling back background process at count 7\n");
165 expected=7;
166 while (expected &gt; 0) {
167 YIELD_THEN_WAIT_UNTIL(msg.contains('bg process'));
168 expected--;
171 /* Make sure background process has exited */
172 GENERATE_MSG(3000, "continue");
173 while (!msg.contains('continue')) {
174 YIELD();
175 if (msg.contains('bg process')) {
176 log.log("Too many bg messages at phase: " + phase + "\n");
177 log.testFailed(); /* We are done! */
178 while (true) YIELD();
181 log.log("Background process was rolled back successfully\n\n");
182 phase++;
185 log.testOK(); /* We are done! */</script>
186 <active>true</active>
187 </plugin_config>
188 <width>604</width>
189 <z>0</z>
190 <height>409</height>
191 <location_x>246</location_x>
192 <location_y>0</location_y>
193 <minimized>false</minimized>
194 </plugin>
195 </simconf>