From ea9ba23ff50fb4713a35c1b362c700d5b14dff1d Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Sat, 19 Oct 2013 00:54:32 +0300 Subject: [PATCH] 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. --- .../net/cellular/http/ubloxusbgsm/main.cpp | 21 +++++++++++++++---- workspace_tools/tests.py | 3 +-- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/libraries/tests/net/cellular/http/ubloxusbgsm/main.cpp b/libraries/tests/net/cellular/http/ubloxusbgsm/main.cpp index 145c9949d8..9a98ce077a 100644 --- a/libraries/tests/net/cellular/http/ubloxusbgsm/main.cpp +++ b/libraries/tests/net/cellular/http/ubloxusbgsm/main.cpp @@ -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; +} + diff --git a/workspace_tools/tests.py b/workspace_tools/tests.py index dc3009d6a6..d0c727c8f6 100644 --- a/workspace_tools/tests.py +++ b/workspace_tools/tests.py @@ -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",