Added HTTP and NTP test to autodetection pool

pull/900/head
Przemek Wirkus 2015-01-30 09:31:21 +00:00
parent bcfbc3575d
commit 605ee4a0b1
2 changed files with 17 additions and 14 deletions

View File

@ -8,8 +8,12 @@ namespace {
const int BUFFER_SIZE = 512; const int BUFFER_SIZE = 512;
} }
int main() int main() {
{ TEST_TIMEOUT(15);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(HTTP client hello world);
TEST_START("NET_7");
char http_request_buffer[BUFFER_SIZE + 1] = {0}; char http_request_buffer[BUFFER_SIZE + 1] = {0};
HTTPClient http; HTTPClient http;
EthernetInterface eth; EthernetInterface eth;
@ -31,8 +35,7 @@ int main()
if (result == false) { if (result == false) {
eth.disconnect(); eth.disconnect();
notify_completion(false); TEST_RESULT(false);
exit(ret);
} }
} }
@ -56,11 +59,9 @@ int main()
if (result == false) { if (result == false) {
eth.disconnect(); eth.disconnect();
notify_completion(false); TEST_RESULT(false);
exit(ret);
} }
} }
eth.disconnect(); eth.disconnect();
notify_completion(true); TEST_RESULT(true);
return 0;
} }

View File

@ -3,8 +3,12 @@
#include "EthernetInterface.h" #include "EthernetInterface.h"
#include "NTPClient.h" #include "NTPClient.h"
int main() int main() {
{ TEST_TIMEOUT(15);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(NTP client);
TEST_START("NET_8");
EthernetInterface eth; EthernetInterface eth;
NTPClient ntp; NTPClient ntp;
eth.init(); //Use DHCP eth.init(); //Use DHCP
@ -27,11 +31,9 @@ int main()
} }
if (result == false) { if (result == false) {
notify_completion(false); TEST_RESULT(false);
exit(ret);
} }
} }
eth.disconnect(); eth.disconnect();
notify_completion(true); TEST_RESULT(true);
return 0;
} }