Skip to content

Commit ea9ba23

Browse files
committed
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.
1 parent 07e003d commit ea9ba23

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

libraries/tests/net/cellular/http/ubloxusbgsm/main.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#include "UBloxUSBGSMModem.h"
2-
#include "test_env.h"
32
#include "httptest.h"
43

54
#ifndef MODEM_APN
@@ -17,9 +16,23 @@
1716
#define PASSWORD NULL
1817
#endif
1918

20-
int main()
19+
void test(void const* data)
2120
{
2221
UbloxUSBGSMModem modem;
22+
httptest(modem, APN, USERNAME, PASSWORD);
23+
while (true);
24+
}
25+
26+
int main()
27+
{
28+
Thread testTask(test, NULL, osPriorityNormal, 1024 * 4);
29+
DigitalOut led(LED1);
2330

24-
notify_completion(httptest(modem, APN, USERNAME, PASSWORD));
31+
while (true)
32+
{
33+
led = !led;
34+
Thread::wait(1000);
35+
}
36+
return 0;
2537
}
38+

workspace_tools/tests.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,8 @@
569569
{
570570
"id": "UB_1", "description": "u-blox USB GSM modem: HTTP client",
571571
"source_dir": [join(TEST_DIR, "net", "cellular", "http", "ubloxusbgsm"), join(TEST_DIR, "net", "cellular", "http", "common")],
572-
"dependencies": [MBED_LIBRARIES, TEST_MBED_LIB, RTOS_LIBRARIES, USB_HOST_LIBRARIES, UBLOX_LIBRARY],
572+
"dependencies": [MBED_LIBRARIES, RTOS_LIBRARIES, USB_HOST_LIBRARIES, UBLOX_LIBRARY],
573573
"supported": CORTEX_ARM_SUPPORT,
574-
"automated": True,
575574
},
576575
{
577576
"id": "UB_2", "description": "u-blox USB GSM modem: SMS test",

0 commit comments

Comments
 (0)