Changed u-blox modem test

The test is not automated now, so it can be synced with the official
repository.
Also changed it to look more like the original VodafoneUSBModem test by
adding another thread in the code.
pull/88/head^2
Bogdan Marinescu 2013-10-19 00:54:32 +03:00
parent 07e003d783
commit ea9ba23ff5
2 changed files with 18 additions and 6 deletions

View File

@ -1,5 +1,4 @@
#include "UBloxUSBGSMModem.h"
#include "test_env.h"
#include "httptest.h"
#ifndef MODEM_APN
@ -17,9 +16,23 @@
#define PASSWORD NULL
#endif
int main()
void test(void const* data)
{
UbloxUSBGSMModem modem;
notify_completion(httptest(modem, APN, USERNAME, PASSWORD));
httptest(modem, APN, USERNAME, PASSWORD);
while (true);
}
int main()
{
Thread testTask(test, NULL, osPriorityNormal, 1024 * 4);
DigitalOut led(LED1);
while (true)
{
led = !led;
Thread::wait(1000);
}
return 0;
}

View File

@ -569,9 +569,8 @@ TESTS = [
{
"id": "UB_1", "description": "u-blox USB GSM modem: HTTP client",
"source_dir": [join(TEST_DIR, "net", "cellular", "http", "ubloxusbgsm"), join(TEST_DIR, "net", "cellular", "http", "common")],
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB, RTOS_LIBRARIES, USB_HOST_LIBRARIES, UBLOX_LIBRARY],
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, USB_HOST_LIBRARIES, UBLOX_LIBRARY],
"supported": CORTEX_ARM_SUPPORT,
"automated": True,
},
{
"id": "UB_2", "description": "u-blox USB GSM modem: SMS test",