Merge pull request #2239 from pan-/fix_single_thread_rtos_test

Fix behavior when mbed-os RTOS tests are build while the system is singlet hreaded.
pull/2230/head
Sam Grove 2016-07-25 12:55:25 -05:00 committed by GitHub
commit d2dbce0059
10 changed files with 39 additions and 0 deletions

View File

@ -2,6 +2,10 @@
#include "mbed.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
DigitalOut led1(LED1);

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
/*
* The stack size is defined in cmsis_os.h mainly dependent on the underlying toolchain and
* the C standard library. For GCC, ARM_STD and IAR it is defined with a size of 2048 bytes

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
#define QUEUE_SIZE 5
#define THREAD_DELAY 250
#define QUEUE_PUT_ISR_VALUE 128

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
typedef struct {
float voltage; /* AD result of measured voltage */
float current; /* AD result of measured current */

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
#define THREAD_DELAY 50
#define SIGNALS_TO_EMIT 100

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
typedef struct {
float voltage; /* AD result of measured voltage */
float current; /* AD result of measured current */

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
#define THREAD_DELAY 75
#define SEMAPHORE_SLOTS 2
#define SEM_CHANGES 100

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
#define SIGNAL_SET_VALUE 0x01
const int SIGNALS_TO_EMIT = 100;
const int SIGNAL_HANDLE_DELEY = 25;

View File

@ -6,6 +6,9 @@
#include "SynchronizedIntegral.h"
#include "LockGuard.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
using namespace utest::v1;

View File

@ -2,6 +2,10 @@
#include "greentea-client/test_env.h"
#include "rtos.h"
#if defined(MBED_RTOS_SINGLE_THREAD)
#error [NOT_SUPPORTED] test not supported
#endif
DigitalOut LEDs[4] = {
DigitalOut(LED1), DigitalOut(LED2), DigitalOut(LED3), DigitalOut(LED4)
};