Skip to content

Updated testcases #11130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion TESTS/events/queue/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -357,3 +357,4 @@ int main()
return !Harness::run(specification);
}

#endif // !DEVICE_USTICKER
3 changes: 2 additions & 1 deletion TESTS/events/timing/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ using namespace utest::v1;

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

// Test delay
#ifndef TEST_EVENTS_TIMING_TIME
Expand Down Expand Up @@ -148,3 +148,4 @@ int main()
return !Harness::run(specification);
}

#endif // !DEVICE_USTICKER
3 changes: 3 additions & 0 deletions TESTS/lorawan/loraradio/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#error [NOT_SUPPORTED] Requires parameters from application config file.
#endif

#if (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)

using namespace utest::v1;
using namespace mbed;
Expand Down Expand Up @@ -281,3 +282,5 @@ int main()
{
return !Harness::run(specification);
}

#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
3 changes: 2 additions & 1 deletion TESTS/mbed-crypto/sanity/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#if ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
#error [NOT_SUPPORTED] Mbed Crypto is OFF - skipping.
#endif
#else

#include <stdio.h>
#include "mbed.h"
Expand Down Expand Up @@ -460,3 +460,4 @@ int main(void)
{
return !Harness::run(specification);
}
#endif // ((!defined(TARGET_PSA)) || (!defined(MBEDTLS_PSA_CRYPTO_C)))
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/flashiap/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#if !DEVICE_FLASH
#error [NOT_SUPPORTED] Flash API not supported for this target
#endif
#else

#include "utest/utest.h"
#include "utest/utest_serial.h"
Expand Down Expand Up @@ -328,3 +328,5 @@ int main()
{
Harness::run(specification);
}

#endif // !DEVICE_FLASH
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power ticker not supported for this target
#endif
#else

using utest::v1::Case;

Expand Down Expand Up @@ -228,3 +228,5 @@ int main()
{
utest::v1::Harness::run(specification);
}

#endif // !DEVICE_LPTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/lp_timeout/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power timer not supported for this target
#endif
#else

#include "mbed.h"
#include "greentea-client/test_env.h"
Expand Down Expand Up @@ -93,3 +93,5 @@ int main()
{
Harness::run(specification);
}

#endif // !DEVICE_LPTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/lp_timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -350,3 +350,5 @@ int main()
{
return !Harness::run(specification);
}

#endif // !DEVICE_LPTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/mem_trace/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#ifndef MBED_MEM_TRACING_ENABLED
#error [NOT_SUPPORTED] test not supported
#endif
#else

using utest::v1::Case;

Expand Down Expand Up @@ -427,3 +427,5 @@ int main()

return !utest::v1::Harness::run(specification);
}

#endif // MBED_MEM_TRACING_ENABLED
12 changes: 5 additions & 7 deletions TESTS/mbed_drivers/race_test/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
#include "SingletonPtr.h"
#include <stdio.h>

#ifdef MBED_RTOS_SINGLE_THREAD
#error [NOT_SUPPORTED] test not supported for single threaded enviroment
#endif

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#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;

Expand Down Expand Up @@ -135,3 +131,5 @@ int main()
{
Harness::run(specification);
}

#endif // defined(MBED_RTOS_SINGLE_THREAD) || !DEVICE_USTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/reset_reason/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#if !DEVICE_RESET_REASON
#error [NOT_SUPPORTED] Reset reason API not supported for this target
#endif
#else

#include "greentea-client/test_env.h"
#include "unity/unity.h"
Expand Down Expand Up @@ -141,3 +141,5 @@ int main()
test_reset_reason(); // The result of this test suite is reported by the host side.
GREENTEA_TESTSUITE_RESULT(0); // Fail on any error.
}

#endif // !DEVICE_RESET_REASON
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/rtc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#if !DEVICE_RTC || !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -494,3 +494,5 @@ int main()
{
return !Harness::run(specification);
}

#endif // !DEVICE_RTC || !DEVICE_USTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/sleep_lock/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

#if !DEVICE_SLEEP
#error [NOT_SUPPORTED] Sleep not supported for this target
#endif
#else

#include "utest/utest.h"
#include "unity/unity.h"
Expand Down Expand Up @@ -132,3 +132,5 @@ int main()
{
Harness::run(specification);
}

#endif // !DEVICE_SLEEP
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

using utest::v1::Case;

Expand Down Expand Up @@ -354,3 +354,5 @@ int main()
{
utest::v1::Harness::run(specification);
}

#endif // !DEVICE_USTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/timeout/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] usticker not supported for this target.
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -87,3 +87,5 @@ int main()
{
Harness::run(specification);
}

#endif // !DEVICE_USTICKER
3 changes: 2 additions & 1 deletion TESTS/mbed_drivers/timer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -789,3 +789,4 @@ int main()
return !Harness::run(specification);
}

#endif // !DEVICE_USTICKER
8 changes: 3 additions & 5 deletions TESTS/mbed_drivers/timerevent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] usticker not supported for this target.
#endif
#else

#include "mbed.h"
#include "greentea-client/test_env.h"
Expand All @@ -27,10 +27,6 @@

using namespace utest::v1;

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif

#define TEST_DELAY_US 50000ULL
#define DELTA 2

Expand Down Expand Up @@ -246,3 +242,5 @@ int main()
{
return !Harness::run(specification);
}

#endif // !DEVICE_USTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_drivers/watchdog/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#if !DEVICE_WATCHDOG
#error [NOT_SUPPORTED] Watchdog not supported for this target
#endif
#else

#include "greentea-client/test_env.h"
#include "unity/unity.h"
Expand Down Expand Up @@ -282,3 +282,5 @@ int main()
// Harness will start with a test case index provided by host script.
return !Harness::run(specification);
}

#endif // !DEVICE_WATCHDOG
3 changes: 2 additions & 1 deletion TESTS/mbed_drivers/watchdog_reset/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#if !DEVICE_WATCHDOG
#error [NOT_SUPPORTED] Watchdog not supported for this target
#endif
#else

#include "greentea-client/test_env.h"
#include "utest/utest.h"
Expand Down Expand Up @@ -319,3 +319,4 @@ int main()
// Harness will start with a test case index provided by host script.
return !Harness::run(specification);
}
#endif // !DEVICE_WATCHDOG
3 changes: 2 additions & 1 deletion TESTS/mbed_hal/common_tickers/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

#define US_PER_S 1000000

Expand Down Expand Up @@ -605,3 +605,4 @@ int main()
{
return !Harness::run(specification);
}
#endif // !DEVICE_USTICKER
10 changes: 4 additions & 6 deletions TESTS/mbed_hal/common_tickers_freq/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,9 @@
#include "hal/lp_ticker_api.h"
#include "hal/mbed_lp_ticker_wrapper.h"

#if defined(SKIP_TIME_DRIFT_TESTS)
#if defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif

#if !DEVICE_USTICKER
#error [NOT_SUPPORTED] test not supported
#endif
#else

#define US_PER_S 1000000

Expand Down Expand Up @@ -208,3 +204,5 @@ int main()
{
Harness::run(specification);
}

#endif // defined(SKIP_TIME_DRIFT_TESTS) || !DEVICE_USTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_hal/crc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

#if !DEVICE_CRC
#error [NOT_SUPPORTED] CRC not supported for this target
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -280,3 +280,5 @@ int main()

Harness::run(specification);
}

#endif // !DEVICE_CRC
4 changes: 3 additions & 1 deletion TESTS/mbed_hal/flash/functional_tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#if !DEVICE_FLASH
#error [NOT_SUPPORTED] Flash API not supported for this target
#endif
#else

#include "utest/utest.h"
#include "unity/unity.h"
Expand Down Expand Up @@ -280,3 +280,5 @@ int main()
{
Harness::run(specification);
}

#endif !DEVICE_FLASH
4 changes: 3 additions & 1 deletion TESTS/mbed_hal/lp_ticker/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#if !DEVICE_LPTICKER
#error [NOT_SUPPORTED] Low power timer not supported for this target
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -204,3 +204,5 @@ int main()
{
return !Harness::run(specification);
}

#endif // !DEVICE_LPTICKER
4 changes: 3 additions & 1 deletion TESTS/mbed_hal/mpu/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#if !DEVICE_MPU
#error [NOT_SUPPORTED] MPU API not supported for this target
#endif
#else

using namespace utest::v1;

Expand Down Expand Up @@ -197,3 +197,5 @@ int main()
{
Harness::run(specification);
}

#endif // !DEVICE_MPU
Loading