@@ -157,14 +157,26 @@ static void net_bringup()
157
157
printf (" MBED: IP address is '%s'\n " , net->get_ip_address ());
158
158
}
159
159
160
+ static void net_bringdown ()
161
+ {
162
+ NetworkInterface::get_default_instance ()->disconnect ();
163
+ printf (" MBED: ifdown\n " );
164
+ }
165
+
160
166
// Test setup
161
167
utest::v1::status_t test_setup (const size_t number_of_cases)
162
168
{
163
- GREENTEA_SETUP (200 , " default_auto" );
169
+ GREENTEA_SETUP (10 * 60 , " default_auto" );
164
170
net_bringup ();
165
171
return verbose_test_setup_handler (number_of_cases);
166
172
}
167
173
174
+ void greentea_teardown (const size_t passed, const size_t failed, const failure_t failure)
175
+ {
176
+ net_bringdown ();
177
+ return greentea_test_teardown_handler (passed, failed, failure);
178
+ }
179
+
168
180
Case cases[] = {
169
181
Case (" ASYNCHRONOUS_DNS" , ASYNCHRONOUS_DNS),
170
182
Case (" ASYNCHRONOUS_DNS_SIMULTANEOUS" , ASYNCHRONOUS_DNS_SIMULTANEOUS),
@@ -181,7 +193,7 @@ Case cases[] = {
181
193
Case (" SYNCHRONOUS_DNS_INVALID" , SYNCHRONOUS_DNS_INVALID),
182
194
};
183
195
184
- Specification specification (test_setup, cases, greentea_continue_handlers);
196
+ Specification specification (test_setup, cases, greentea_teardown, greentea_continue_handlers);
185
197
186
198
int main ()
187
199
{
0 commit comments