forked from ARMmbed/mbed-os
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake: greentea: Port events tests to CTest
Following the approach defined in ARMmbed#14892 and ARMmbed#14902, events greentea tests are ported to enable running with CTest. events/equeue requires MBED_EXTENDED_TESTS. events/queue and events/timing both require DEVICE_USTICKER.
- Loading branch information
Showing
5 changed files
with
31 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory(events/equeue) | ||
add_subdirectory(events/queue) | ||
add_subdirectory(events/timing) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
include(mbed_greentea) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-events-equeue) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "MBED_EXTENDED_TESTS" IN_LIST MBED_CONFIG_DEFINITIONS) | ||
set(TEST_SKIPPED "Disabled by default to limit testing time") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-events-equeue | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_REQUIRED_LIBS | ||
mbed-events | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
include(mbed_greentea) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-events-queue) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "Microsecond ticker required") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-events-queue | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_REQUIRED_LIBS | ||
mbed-events | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
include(mbed_greentea) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-events-timing) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "Microsecond ticker required") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-events-timing | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_REQUIRED_LIBS | ||
mbed-events | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |