mirror of https://github.com/ARMmbed/mbed-os.git
- Emac,NFC-EEPROM,PSA-CRYPTO components build issue fixed
- RTOS supported test case guarded with MBED_CONF_RTOS_PRESENT flag - Added the #error to non supported test case for bare metalpull/11721/head
parent
3fc8905315
commit
302f595c28
|
@ -11,7 +11,30 @@
|
|||
"filesystem",
|
||||
"littlefs",
|
||||
"mbed-trace",
|
||||
"device-key",
|
||||
"lora"
|
||||
]
|
||||
"device_key",
|
||||
"storage_tdb_internal",
|
||||
"storage_filesystem",
|
||||
"storage_tdb_external",
|
||||
"lora",
|
||||
"nfc",
|
||||
"network-emac",
|
||||
"nanostack-libservice",
|
||||
"flashiap-block-device",
|
||||
"system-storage",
|
||||
"filesystemstore",
|
||||
"SecureStore",
|
||||
"storage",
|
||||
"kv-map",
|
||||
"direct-access-devicekey",
|
||||
"tdbstore",
|
||||
"kv-config",
|
||||
"events",
|
||||
"kv-global-api",
|
||||
"sd"
|
||||
],
|
||||
"target_overrides": {
|
||||
"*": {
|
||||
"target.device_has_remove": ["EMAC", "USBDEVICE"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,10 @@
|
|||
*/
|
||||
#include "mbed_events.h"
|
||||
#include "mbed.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
*/
|
||||
#include "mbed_events.h"
|
||||
#include "mbed.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
|
@ -84,6 +86,7 @@ void timer_timing_test()
|
|||
// equeue tick timing test
|
||||
void tick_timing_test()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
unsigned start = equeue_tick();
|
||||
int prev = 0;
|
||||
|
||||
|
@ -96,11 +99,13 @@ void tick_timing_test()
|
|||
TEST_ASSERT(next >= prev);
|
||||
prev = next;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// equeue semaphore timing test
|
||||
void semaphore_timing_test()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
srand(0);
|
||||
timer.reset();
|
||||
timer.start();
|
||||
|
@ -125,6 +130,7 @@ void semaphore_timing_test()
|
|||
}
|
||||
|
||||
equeue_sema_destroy(&sema);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#if INTEGRATION_TESTS
|
||||
|
||||
#include "mbed.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -206,4 +204,4 @@ size_t download_test(NetworkInterface *interface, const unsigned char *data, siz
|
|||
|
||||
return received_bytes;
|
||||
}
|
||||
|
||||
#endif // INTEGRATION_TESTS
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
/*
|
||||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if INTEGRATION_TESTS
|
||||
size_t download_test(NetworkInterface *interface, const unsigned char *data, size_t data_length, size_t buff_size, uint32_t thread_id = 0);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,9 +20,7 @@
|
|||
/*
|
||||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#if INTEGRATION_TESTS
|
||||
|
||||
#include "mbed.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -106,3 +104,4 @@ void file_test_read(const char *file, size_t offset, const unsigned char *data,
|
|||
float(data_length) / 1024, float(data_length) / timer.read() / 1024, timer.read());
|
||||
}
|
||||
|
||||
#endif //#if INTEGRATION_TESTS
|
|
@ -20,7 +20,8 @@
|
|||
/*
|
||||
* Based on mbed-stress-test by Marcus Chang @ Arm Mbed - http://github.com/ARMmbed/mbed-stress-test
|
||||
*/
|
||||
|
||||
#if INTEGRATION_TESTS
|
||||
void file_test_write(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
|
||||
|
||||
void file_test_read(const char *file, size_t offset, const unsigned char *data, size_t data_length, size_t block_size);
|
||||
#endif
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
|
@ -162,3 +162,4 @@ int main()
|
|||
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
|
@ -181,3 +181,4 @@ int main()
|
|||
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "utest/utest.h"
|
||||
|
@ -139,3 +139,4 @@ int main()
|
|||
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "utest/utest.h"
|
||||
|
@ -173,3 +173,4 @@ int main()
|
|||
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#if !INTEGRATION_TESTS
|
||||
#error [NOT_SUPPORTED] integration tests not enabled for this target
|
||||
#endif
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "FATFileSystem.h"
|
||||
|
@ -244,3 +244,4 @@ int main()
|
|||
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -13,11 +13,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] LORADIO tests are not enabled for Bare Metal.
|
||||
#else
|
||||
|
||||
#include "utest.h"
|
||||
#include "unity.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
||||
#include "Semaphore.h"
|
||||
|
||||
#include "mbed_trace.h"
|
||||
#define TRACE_GROUP "RTST"
|
||||
|
||||
|
@ -34,8 +39,6 @@
|
|||
#error [NOT_SUPPORTED] Requires parameters from application config file.
|
||||
#endif
|
||||
|
||||
#include "Semaphore.h"
|
||||
|
||||
#if (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
|
||||
|
||||
using namespace utest::v1;
|
||||
|
@ -284,3 +287,4 @@ int main()
|
|||
}
|
||||
|
||||
#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
|
||||
#endif // !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -136,6 +136,7 @@ void test_thread(void)
|
|||
|
||||
void test_thread_safety()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
char test[] = "123456789";
|
||||
uint32_t crc;
|
||||
|
||||
|
@ -152,6 +153,7 @@ void test_thread_safety()
|
|||
|
||||
// Wait for the thread to finish
|
||||
t1.join();
|
||||
#endif
|
||||
}
|
||||
|
||||
Case cases[] = {
|
||||
|
|
|
@ -43,12 +43,12 @@ volatile uint32_t multi_counter;
|
|||
Timer gtimer;
|
||||
|
||||
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
void sem_release(Semaphore *sem)
|
||||
{
|
||||
sem->release();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void stop_gtimer_set_flag(void)
|
||||
{
|
||||
|
@ -71,6 +71,7 @@ void increment_multi_counter(void)
|
|||
*/
|
||||
void test_multi_ticker(void)
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
LowPowerTicker ticker[TICKER_COUNT];
|
||||
const uint32_t extra_wait = 10; // extra 10ms wait time
|
||||
|
||||
|
@ -105,6 +106,7 @@ void test_multi_ticker(void)
|
|||
// (e.g. when head event is removed), it's good to check if
|
||||
// no more callbacks were triggered during detaching.
|
||||
TEST_ASSERT_EQUAL(TICKER_COUNT, multi_counter);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Test multi callback time
|
||||
|
@ -140,6 +142,7 @@ void test_multi_call_time(void)
|
|||
*/
|
||||
void test_detach(void)
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
LowPowerTicker ticker;
|
||||
bool ret;
|
||||
const float ticker_time_s = 0.1f;
|
||||
|
@ -155,6 +158,7 @@ void test_detach(void)
|
|||
|
||||
ret = sem.try_acquire_for(wait_time_ms);
|
||||
TEST_ASSERT_FALSE(ret);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Test single callback time via attach
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !DEVICE_LPTICKER
|
||||
#error [NOT_SUPPORTED] Low power timer not supported for this target
|
||||
#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Low power timer test cases are not supported.
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
#include "hal/us_ticker_api.h"
|
||||
|
||||
#if !DEVICE_LPTICKER
|
||||
|
|
|
@ -14,6 +14,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Test not supported for single threaded and also bare metal enviroment. UsTicker need to be enabled for this test.
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "rtos.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -22,10 +27,6 @@
|
|||
#include "SingletonPtr.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] Test not supported for single threaded enviroment. UsTicker need to be enabled for this test.
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#define TEST_STACK_SIZE 512
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
#include "rtc_api.h"
|
||||
|
||||
#if !DEVICE_RTC || !DEVICE_USTICKER
|
||||
|
|
|
@ -76,11 +76,12 @@ void ticker_callback_2(void)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
void sem_release(Semaphore *sem)
|
||||
{
|
||||
sem->release();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void stop_gtimer_set_flag(void)
|
||||
|
@ -193,6 +194,7 @@ void test_case_2x_ticker()
|
|||
*/
|
||||
void test_multi_ticker(void)
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
Ticker ticker[TICKER_COUNT];
|
||||
const uint32_t extra_wait = 5; // extra 5ms wait time
|
||||
|
||||
|
@ -227,6 +229,7 @@ void test_multi_ticker(void)
|
|||
// (e.g. when head event is removed), it's good to check if
|
||||
// no more callbacks were triggered during detaching.
|
||||
TEST_ASSERT_EQUAL(TICKER_COUNT, multi_counter);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Test multi callback time
|
||||
|
@ -262,6 +265,7 @@ void test_multi_call_time(void)
|
|||
*/
|
||||
void test_detach(void)
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
Ticker ticker;
|
||||
bool ret;
|
||||
const float ticker_time_s = 0.1f;
|
||||
|
@ -277,6 +281,7 @@ void test_detach(void)
|
|||
|
||||
ret = sem.try_acquire_for(wait_time_ms);
|
||||
TEST_ASSERT_FALSE(ret);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Test single callback time via attach
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
#include "unity/unity.h"
|
||||
#include "timeout_tests.h"
|
||||
|
||||
#if !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] usticker not supported for this target.
|
||||
#if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] usticker test not supported.
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
*/
|
||||
#ifndef MBED_TIMEOUT_TESTS_H
|
||||
#define MBED_TIMEOUT_TESTS_H
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -413,4 +414,5 @@ void test_drift(void)
|
|||
TEST_ASSERT_EQUAL_STRING_MESSAGE("pass", _key, "Host script reported a failure");
|
||||
}
|
||||
|
||||
#endif // defined(MBED_CONF_RTOS_PRESENT)
|
||||
#endif
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
#include "hal/us_ticker_api.h"
|
||||
|
||||
#if !DEVICE_USTICKER
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] usticker not supported for this target.
|
||||
#if !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] usticker test not supported.
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
|
@ -243,4 +243,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_USTICKER
|
||||
#endif // !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !DEVICE_WATCHDOG
|
||||
#error [NOT_SUPPORTED] Watchdog not supported for this target
|
||||
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Watchdo test not supported.
|
||||
#else
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !DEVICE_WATCHDOG
|
||||
#error [NOT_SUPPORTED] Watchdog not supported for this target
|
||||
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Watchdog reset test not supported.
|
||||
#else
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -30,9 +35,6 @@ extern "C" {
|
|||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#if !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#define US_PER_S 1000000
|
||||
|
||||
|
@ -605,4 +607,4 @@ int main()
|
|||
{
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif // !DEVICE_USTICKER
|
||||
#endif // !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
#include "hal/lp_ticker_api.h"
|
||||
#include "hal/mbed_lp_ticker_wrapper.h"
|
||||
|
||||
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
|
||||
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -205,4 +205,4 @@ int main()
|
|||
Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
|
||||
#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER || !defined(MBED_RTOS_CONF_PRESENT)
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Low power timer test not supported.
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -23,9 +28,7 @@
|
|||
#include "hal/mbed_lp_ticker_wrapper.h"
|
||||
#include "hal/us_ticker_api.h"
|
||||
|
||||
#if !DEVICE_LPTICKER
|
||||
#error [NOT_SUPPORTED] Low power timer not supported for this target
|
||||
#else
|
||||
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
|
@ -206,4 +209,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_LPTICKER
|
||||
#endif // !DEVICE_LPTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -120,6 +120,7 @@ void rtc_sleep_test()
|
|||
/* Test that the RTC keeps counting even after ::rtc_free has been called. */
|
||||
void rtc_persist_test()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
const uint32_t start = 100;
|
||||
rtc_init();
|
||||
rtc_write(start);
|
||||
|
@ -134,6 +135,7 @@ void rtc_persist_test()
|
|||
|
||||
TEST_ASSERT_TRUE(enabled);
|
||||
TEST_ASSERT_UINT32_WITHIN(WAIT_TOLERANCE, WAIT_TIME, stop - start);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Test time does not glitch backwards due to an incorrectly implemented ripple counter driver. */
|
||||
|
@ -156,6 +158,7 @@ void rtc_glitch_test()
|
|||
/* Test that the RTC correctly handles different time values. */
|
||||
void rtc_range_test()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
static const uint32_t starts[] = {
|
||||
0x00000000,
|
||||
0xEFFFFFFF,
|
||||
|
@ -172,6 +175,7 @@ void rtc_range_test()
|
|||
TEST_ASSERT_UINT32_WITHIN(WAIT_TOLERANCE, WAIT_TIME, stop - start);
|
||||
}
|
||||
rtc_free();
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Test that the RTC accuracy is at least 10%. */
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !DEVICE_SLEEP
|
||||
#error [NOT_SUPPORTED] sleep not supported for this target
|
||||
#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] sleep not supported for this target and also for bare metal.
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
|
@ -262,4 +262,4 @@ int main()
|
|||
Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_SLEEP
|
||||
#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "../sleep/sleep_test_utils.h"
|
||||
#include "sleep_manager_api_tests.h"
|
||||
|
||||
#if !DEVICE_SLEEP
|
||||
#if !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -335,4 +335,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_SLEEP
|
||||
#endif // !DEVICE_SLEEP || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
using namespace utest::v1;
|
||||
|
||||
#define TEST_STACK_SIZE 256
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
void sleep_manager_locking_thread_test()
|
||||
{
|
||||
for (uint32_t i = 0; i < 100; i++) {
|
||||
|
@ -35,9 +35,10 @@ void sleep_manager_locking_thread_test()
|
|||
sleep_manager_unlock_deep_sleep();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
void sleep_manager_multithread_test()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
{
|
||||
Callback<void()> cb(sleep_manager_locking_thread_test);
|
||||
Thread t1(osPriorityNormal, TEST_STACK_SIZE);
|
||||
|
@ -54,6 +55,7 @@ void sleep_manager_multithread_test()
|
|||
|
||||
bool deep_sleep_allowed = sleep_manager_can_deep_sleep_test_check();
|
||||
TEST_ASSERT_TRUE_MESSAGE(deep_sleep_allowed, "Deep sleep should be allowed");
|
||||
#endif
|
||||
}
|
||||
|
||||
void sleep_manager_locking_irq_test()
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
|
||||
#ifdef TARGET_RENESAS
|
||||
#error [NOT_SUPPORTED] Cortex-A target not supported for this test
|
||||
#if defined(TARGET_RENESAS) || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Cortex-A target and bare metal not supported for this test
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
@ -75,4 +75,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // TARGET_RENESAS
|
||||
#endif // TARGET_RENESAS || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !DEVICE_WATCHDOG
|
||||
#error [NOT_SUPPORTED] Watchdog not supported for this target
|
||||
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Watchdog test not supported.
|
||||
#else
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -284,4 +284,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_WATCHDOG
|
||||
#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !DEVICE_WATCHDOG
|
||||
#error [NOT_SUPPORTED] Watchdog not supported for this target
|
||||
#if !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Watchdog test not supported.
|
||||
#else
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -320,4 +320,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // !DEVICE_WATCHDOG
|
||||
#endif // !DEVICE_WATCHDOG || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] crash_reporting test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "mbed_error.h"
|
||||
#include "mbed_crash_data_offsets.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity/unity.h"
|
||||
|
||||
#if !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
|
||||
#error [NOT_SUPPORTED] crash_reporting test not supported
|
||||
#else
|
||||
|
||||
#define MSG_VALUE_DUMMY "0"
|
||||
#define MSG_VALUE_LEN 32
|
||||
#define MSG_KEY_LEN 64
|
||||
|
@ -79,4 +79,4 @@ int main(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED
|
||||
#endif // !MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -118,6 +118,7 @@ void test_error_capturing()
|
|||
*/
|
||||
void test_error_context_capture()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
uint32_t error_value = 0xABCD;
|
||||
mbed_error_ctx error_ctx = {0};
|
||||
|
||||
|
@ -135,6 +136,7 @@ void test_error_context_capture()
|
|||
#if MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED
|
||||
TEST_ASSERT_EQUAL_STRING(MBED_FILENAME, error_ctx.error_filename);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MBED_CONF_PLATFORM_ERROR_HIST_ENABLED
|
||||
|
@ -246,16 +248,19 @@ void test_error_logging_multithread()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
static Semaphore callback_sem;
|
||||
void MyErrorHook(const mbed_error_ctx *error_ctx)
|
||||
{
|
||||
callback_sem.release();
|
||||
}
|
||||
#endif
|
||||
|
||||
/** Test error hook
|
||||
*/
|
||||
void test_error_hook()
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
if (MBED_SUCCESS != mbed_set_error_hook(MyErrorHook)) {
|
||||
TEST_FAIL();
|
||||
}
|
||||
|
@ -264,6 +269,7 @@ void test_error_hook()
|
|||
bool acquired = callback_sem.try_acquire_for(5000);
|
||||
|
||||
TEST_ASSERT(acquired);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MBED_CONF_PLATFORM_ERROR_HIST_ENABLED && defined(MBED_TEST_SIM_BLOCKDEVICE)
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#define THREAD_STACK_SIZE 512
|
||||
|
@ -666,3 +670,4 @@ int main()
|
|||
Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "utest/utest.h"
|
||||
#include "unity/unity.h"
|
||||
|
||||
#if defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#if defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -116,4 +116,4 @@ int main()
|
|||
utest::v1::Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(SKIP_TIME_DRIFT_TESTS) || defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,16 +13,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#include "rtos.h"
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#define TEST_STACK_SIZE 512
|
||||
|
@ -185,4 +186,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
using utest::v1::Case;
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -371,4 +371,4 @@ int main()
|
|||
return !utest::v1::Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(TARGET_CORTEX_A) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] This function not supported for this target
|
||||
#if defined(TARGET_CORTEX_A) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported.
|
||||
#else
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -263,4 +263,4 @@ int main()
|
|||
return !utest::v1::Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_CORTEX_A) || !DEVICE_USTICKER
|
||||
#endif // defined(TARGET_CORTEX_A) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "utest/utest.h"
|
||||
#include "unity/unity.h"
|
||||
|
@ -117,3 +121,4 @@ int main()
|
|||
{
|
||||
return !utest::v1::Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -13,16 +13,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#include "rtos.h"
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
|
||||
|
@ -509,4 +510,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "unity/unity.h"
|
||||
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#if !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -27,6 +27,7 @@ using utest::v1::Case;
|
|||
|
||||
extern uint32_t mbed_heap_size;
|
||||
static const int test_timeout = 25;
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
volatile bool thread_should_continue = true;
|
||||
#define NUM_THREADS 4
|
||||
#define THREAD_MALLOC_SIZE 100
|
||||
|
@ -59,7 +60,7 @@ void task_using_malloc(void)
|
|||
free(data);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
/** Test for multithreaded heap allocations
|
||||
|
||||
Given multiple threads are started in parallel
|
||||
|
@ -68,6 +69,7 @@ void task_using_malloc(void)
|
|||
*/
|
||||
void test_multithread_allocation(void)
|
||||
{
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
// static stack for threads to reduce heap usage on devices with small RAM
|
||||
// and eliminate run out of heap memory problem
|
||||
uint8_t stack[NUM_THREADS][THREAD_STACK_SIZE];
|
||||
|
@ -101,6 +103,7 @@ void test_multithread_allocation(void)
|
|||
}
|
||||
}
|
||||
TEST_ASSERT_FALSE(thread_alloc_failure);
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Test for multiple heap alloc and free calls */
|
||||
|
@ -218,4 +221,4 @@ int main()
|
|||
return !utest::v1::Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,16 +13,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#include "rtos.h"
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#if defined(__CORTEX_M23) || defined(__CORTEX_M33)
|
||||
|
@ -305,4 +306,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,16 +13,17 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#include "rtos.h"
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
#define THREAD_STACK_SIZE 512
|
||||
|
@ -345,4 +346,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -360,3 +365,4 @@ int main()
|
|||
|
||||
#endif // !DEVICE_USTICKER
|
||||
#endif // RESTART_DELAY_MS >= DELAY_MS
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -21,10 +26,6 @@
|
|||
|
||||
using namespace utest::v1;
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#define THREAD_DELAY 30
|
||||
#define SEMAPHORE_SLOTS 2
|
||||
#define SEM_CHANGES 100
|
||||
|
@ -246,4 +247,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
using utest::v1::Case;
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
|
@ -393,4 +393,4 @@ int main()
|
|||
return !utest::v1::Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#include "ticker_api.h"
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
extern "C" {
|
||||
#include "rtx_lib.h"
|
||||
|
@ -351,3 +354,4 @@ int main()
|
|||
{
|
||||
return !Harness::run(specification);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef MBEDMICRO_RTOS_MBED_THREADS_LOCK_GUARD
|
||||
#define MBEDMICRO_RTOS_MBED_THREADS_LOCK_GUARD
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include <rtos.h>
|
||||
|
||||
|
@ -49,5 +50,5 @@ private:
|
|||
LockGuard &operator=(const LockGuard &);
|
||||
rtos::Mutex &_mutex;
|
||||
};
|
||||
|
||||
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
|
||||
#endif /* MBEDMICRO_RTOS_MBED_THREADS_LOCK_GUARD */
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef MBEDMICRO_RTOS_MBED_THREADS_SYNCHRONIZED_INTEGRAL
|
||||
#define MBEDMICRO_RTOS_MBED_THREADS_SYNCHRONIZED_INTEGRAL
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include <rtos.h>
|
||||
#include "LockGuard.h"
|
||||
|
@ -75,5 +76,5 @@ private:
|
|||
mutable rtos::Mutex _mutex;
|
||||
T _value;
|
||||
};
|
||||
|
||||
#endif /* #if defined(MBED_CONF_RTOS_PRESENT) */
|
||||
#endif /* MBEDMICRO_RTOS_MBED_THREADS_SYNCHRONIZED_INTEGRAL */
|
||||
|
|
|
@ -13,6 +13,11 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -21,10 +26,6 @@
|
|||
#include "SynchronizedIntegral.h"
|
||||
#include "LockGuard.h"
|
||||
|
||||
#if defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
|
||||
#define THREAD_STACK_SIZE 512
|
||||
#if defined(__CORTEX_A9) || defined(__CORTEX_M23) || defined(__CORTEX_M33) || defined(TARGET_ARM_FM) || defined(TARGET_CY8CKIT_062_WIFI_BT_PSA)
|
||||
#define PARALLEL_THREAD_STACK_SIZE 512
|
||||
|
@ -847,4 +848,4 @@ int main()
|
|||
return !Harness::run(specification);
|
||||
}
|
||||
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
|
||||
#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER || !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -18,7 +18,9 @@
|
|||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
#include "utest.h"
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "rtos.h"
|
||||
#endif
|
||||
|
||||
using namespace utest::v1;
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -40,3 +42,4 @@ void ASYNCHRONOUS_DNS()
|
|||
TEST_ASSERT_EQUAL(0, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -66,3 +67,4 @@ void ASYNCHRONOUS_DNS_CACHE()
|
|||
dns_test_hosts[0], data.addr.get_ip_address(), delay_ms);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -86,3 +87,4 @@ void ASYNCHRONOUS_DNS_CANCEL()
|
|||
|
||||
ThisThread::sleep_for(5000);
|
||||
}
|
||||
#endif // #if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -76,3 +77,4 @@ void ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE()
|
|||
|
||||
nsapi_dns_call_in_set(0);
|
||||
}
|
||||
#endif // defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -64,3 +66,4 @@ void ASYNCHRONOUS_DNS_INVALID_HOST()
|
|||
TEST_ASSERT(result_dns_failure == exp_dns_failure || result_dns_failure == exp_dns_failure + 1);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif // defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -56,3 +58,4 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
|
|||
|
||||
TEST_ASSERT(strlen(data.addr.get_ip_address()) > 1);
|
||||
}
|
||||
#endif // defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -41,3 +43,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS()
|
|||
TEST_ASSERT_EQUAL(0, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -42,3 +44,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE()
|
|||
TEST_ASSERT_EQUAL(0, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -44,3 +46,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT()
|
|||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -69,3 +71,4 @@ void ASYNCHRONOUS_DNS_TIMEOUTS()
|
|||
|
||||
nsapi_dns_call_in_set(0);
|
||||
}
|
||||
#endif // defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef DNS_TESTS_H
|
||||
#define DNS_TESTS_H
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "nsapi_dns.h"
|
||||
|
||||
|
@ -92,4 +93,5 @@ void SYNCHRONOUS_DNS();
|
|||
void SYNCHRONOUS_DNS_MULTIPLE();
|
||||
void SYNCHRONOUS_DNS_CACHE();
|
||||
void SYNCHRONOUS_DNS_INVALID();
|
||||
#endif /* defined(MBED_CONF_RTOS_PRESENT) */
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] Test not supported.
|
||||
#else
|
||||
|
||||
#define WIFI 2
|
||||
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
|
||||
(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
|
@ -215,3 +219,4 @@ int main()
|
|||
}
|
||||
|
||||
#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
#endif // !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -40,3 +41,4 @@ void SYNCHRONOUS_DNS()
|
|||
TEST_ASSERT_EQUAL(0, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -54,3 +56,4 @@ void SYNCHRONOUS_DNS_CACHE()
|
|||
dns_test_hosts[0], address.get_ip_address(), delay_ms);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "unity.h"
|
||||
|
@ -59,3 +61,4 @@ void SYNCHRONOUS_DNS_INVALID()
|
|||
TEST_ASSERT_EQUAL(expected_failures, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "mbed.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -40,3 +41,4 @@ void SYNCHRONOUS_DNS_MULTIPLE()
|
|||
TEST_ASSERT_EQUAL(0, result_dns_failure);
|
||||
TEST_ASSERT_EQUAL(0, result_exp_timeout);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] NVSTORE needs to be enabled for this test
|
||||
#else
|
||||
|
||||
#define WIFI 2
|
||||
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
|
||||
(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
|
@ -240,3 +244,4 @@ int main()
|
|||
|
||||
#endif // ECHO_SERVER_ADDR
|
||||
#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
#endif // !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef TCP_TESTS_H
|
||||
#define TCP_TESTS_H
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "../test_params.h"
|
||||
|
||||
|
@ -88,3 +89,4 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY();
|
|||
void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID();
|
||||
|
||||
#endif //TCP_TESTS_H
|
||||
#endif //!defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -43,3 +44,4 @@ void TCPSOCKET_BIND_ADDRESS()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,8 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -49,3 +51,4 @@ void TCPSOCKET_BIND_ADDRESS_INVALID()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -42,3 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_NULL()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -42,3 +43,4 @@ void TCPSOCKET_BIND_ADDRESS_PORT()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -42,3 +43,4 @@ void TCPSOCKET_BIND_PORT()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -52,3 +53,4 @@ void TCPSOCKET_BIND_PORT_FAIL()
|
|||
delete sock;
|
||||
delete sock2;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -41,3 +42,4 @@ void TCPSOCKET_BIND_UNOPENED()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -51,3 +52,4 @@ void TCPSOCKET_BIND_WRONG_TYPE()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -37,3 +38,4 @@ void TCPSOCKET_CONNECT_INVALID()
|
|||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -201,3 +202,4 @@ END:
|
|||
tc_exec_time.stop();
|
||||
free(stack_mem);
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -141,3 +142,4 @@ void TCPSOCKET_ECHOTEST_BURST_NONBLOCK()
|
|||
END:
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -88,3 +89,4 @@ void TCPSOCKET_ENDPOINT_CLOSE()
|
|||
tc_exec_time.stop();
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -38,3 +39,4 @@ void TCPSOCKET_OPEN_CLOSE_REPEAT()
|
|||
}
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -36,3 +37,4 @@ void TCPSOCKET_OPEN_DESTRUCT()
|
|||
delete sock;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -96,3 +97,4 @@ void TCPSOCKET_OPEN_LIMIT()
|
|||
TEST_ASSERT_EQUAL(open_sockets[0], open_sockets[1]);
|
||||
TEST_ASSERT(open_sockets[0] >= 4);
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "greentea-client/test_env.h"
|
||||
#include "mbed.h"
|
||||
#include "tcp_tests.h"
|
||||
|
@ -37,3 +38,4 @@ void TCPSOCKET_OPEN_TWICE()
|
|||
|
||||
delete sock;
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -195,3 +196,4 @@ void TCPSOCKET_RECV_100K_NONBLOCK()
|
|||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -88,3 +89,4 @@ CLEANUP:
|
|||
tc_exec_time.stop();
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -43,3 +44,4 @@ void TCPSOCKET_SEND_REPEAT()
|
|||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -52,3 +53,4 @@ void TCPSOCKET_SEND_TIMEOUT()
|
|||
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -49,3 +50,4 @@ void TCPSOCKET_SETSOCKOPT_KEEPALIVE_VALID()
|
|||
// TEST_ASSERT_EQUAL(optval, seconds);
|
||||
TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close());
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include "mbed.h"
|
||||
#include "TCPSocket.h"
|
||||
#include "greentea-client/test_env.h"
|
||||
|
@ -167,3 +168,4 @@ void TCPSOCKET_THREAD_PER_SOCKET_SAFETY()
|
|||
running = false;
|
||||
thread.join();
|
||||
}
|
||||
#endif
|
|
@ -15,6 +15,9 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported
|
||||
#else
|
||||
#define WIFI 2
|
||||
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
|
||||
(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
|
@ -251,3 +254,4 @@ int main()
|
|||
|
||||
#endif // ECHO_SERVER_ADDR
|
||||
#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
#endif // !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#ifndef TLS_TESTS_H
|
||||
#define TLS_TESTS_H
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
||||
#include "../test_params.h"
|
||||
#include "TLSSocket.h"
|
||||
|
@ -83,5 +84,5 @@ void TLSSOCKET_SIMULTANEOUS();
|
|||
void TLSSOCKET_SEND_TIMEOUT();
|
||||
|
||||
#endif // defined(MBEDTLS_SSL_CLI_C) || defined(DOXYGEN_ONLY)
|
||||
|
||||
#endif
|
||||
#endif //TLS_TESTS_H
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if !defined(MBED_CONF_RTOS_PRESENT)
|
||||
#error [NOT_SUPPORTED] test not supported.
|
||||
#else
|
||||
|
||||
#define WIFI 2
|
||||
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || \
|
||||
(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
|
@ -204,3 +208,4 @@ int main()
|
|||
|
||||
#endif // ECHO_SERVER_ADDR
|
||||
#endif // !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE) || (MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI && !defined(MBED_CONF_NSAPI_DEFAULT_WIFI_SSID))
|
||||
#endif // !defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
@ -554,3 +554,4 @@ EmacTestMemoryManager &EmacTestMemoryManager::get_instance()
|
|||
return test_memory_manager;
|
||||
}
|
||||
|
||||
#endif //#if defined(MBED_CONF_RTOS_PRESENT)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue