mirror of https://github.com/ARMmbed/mbed-os.git
Added HTTP and NTP test to autodetection pool
parent
bcfbc3575d
commit
605ee4a0b1
|
|
@ -8,8 +8,12 @@ namespace {
|
|||
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};
|
||||
HTTPClient http;
|
||||
EthernetInterface eth;
|
||||
|
|
@ -31,8 +35,7 @@ int main()
|
|||
|
||||
if (result == false) {
|
||||
eth.disconnect();
|
||||
notify_completion(false);
|
||||
exit(ret);
|
||||
TEST_RESULT(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -56,11 +59,9 @@ int main()
|
|||
|
||||
if (result == false) {
|
||||
eth.disconnect();
|
||||
notify_completion(false);
|
||||
exit(ret);
|
||||
TEST_RESULT(false);
|
||||
}
|
||||
}
|
||||
eth.disconnect();
|
||||
notify_completion(true);
|
||||
return 0;
|
||||
TEST_RESULT(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,12 @@
|
|||
#include "EthernetInterface.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;
|
||||
NTPClient ntp;
|
||||
eth.init(); //Use DHCP
|
||||
|
|
@ -27,11 +31,9 @@ int main()
|
|||
}
|
||||
|
||||
if (result == false) {
|
||||
notify_completion(false);
|
||||
exit(ret);
|
||||
TEST_RESULT(false);
|
||||
}
|
||||
}
|
||||
eth.disconnect();
|
||||
notify_completion(true);
|
||||
return 0;
|
||||
TEST_RESULT(true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue