-
Notifications
You must be signed in to change notification settings - Fork 3k
Refactor hal greentea cmake #15056
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
Closed
Closed
Refactor hal greentea cmake #15056
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8c81b95
CMake: Refactor mbed_hal greentea test CMake
rajkan01 44dc077
CMake: Refactor mbed_hal_fpga_ci_test_shield greentea test CMake
rajkan01 d844781
CMake: Refactor mbed_timing_fpga_ci_test_shield greentea test CMake
rajkan01 b851ed9
CMake: Add cmake support for pin_names greentea test
rajkan01 d171a11
CMake: greentea: Add skip reason and pass host_tests path on hal tests
rajkan01 44057a7
Update hal CMake to include greentea test dir
rajkan01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,38 @@ | ||
# Copyright (c) 2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
add_subdirectory(mbed_hal/common_tickers) | ||
add_subdirectory(mbed_hal/common_tickers_freq) | ||
add_subdirectory(mbed_hal/crc) | ||
add_subdirectory(mbed_hal/critical_section) | ||
add_subdirectory(mbed_hal/flash/functional_tests) | ||
add_subdirectory(mbed_hal/lp_ticker) | ||
add_subdirectory(mbed_hal/minimum_requirements) | ||
add_subdirectory(mbed_hal/mpu) | ||
add_subdirectory(mbed_hal/pinmap) | ||
add_subdirectory(mbed_hal/reset_reason) | ||
add_subdirectory(mbed_hal/rtc) | ||
add_subdirectory(mbed_hal/rtc_reset) | ||
add_subdirectory(mbed_hal/rtc_time) | ||
add_subdirectory(mbed_hal/rtc_time_conv) | ||
add_subdirectory(mbed_hal/sleep) | ||
add_subdirectory(mbed_hal/sleep_manager) | ||
add_subdirectory(mbed_hal/sleep_manager_racecondition) | ||
add_subdirectory(mbed_hal/ticker) | ||
add_subdirectory(mbed_hal/trng) | ||
add_subdirectory(mbed_hal/us_ticker) | ||
add_subdirectory(mbed_hal/watchdog) | ||
add_subdirectory(mbed_hal/watchdog_reset) | ||
add_subdirectory(mbed_hal/watchdog_timing) | ||
add_subdirectory(mbed_hal/qspi) | ||
add_subdirectory(mbed_hal/ospi) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/analogin) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/gpio) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/gpio_irq) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/i2c) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/pwm) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/spi) | ||
add_subdirectory(mbed_hal_fpga_ci_test_shield/uart) | ||
add_subdirectory(mbed_timing_fpga_ci_test_shield/watchdog) | ||
add_subdirectory(pin_names/arduino_uno) | ||
add_subdirectory(pin_names/generic) | ||
This file contains hidden or 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,18 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-common-tickers) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "UsTicker need to be enabled for this test.") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-common-tickers | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
21 changes: 12 additions & 9 deletions
21
hal/tests/TESTS/mbed_hal/common_tickers_freq/CMakeLists.txt
This file contains hidden or 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,18 +1,21 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-common-tickers-freq) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_USTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "UsTicker need to be enabled for this test.") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-common-tickers-freq | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains hidden or 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,18 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-crc) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_CRC=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "CRC not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-crc | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains hidden or 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,18 +1,13 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-hal-critical-section) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
include(mbed_greentea) | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-critical-section | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
) |
17 changes: 8 additions & 9 deletions
17
hal/tests/TESTS/mbed_hal/flash/functional_tests/CMakeLists.txt
This file contains hidden or 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,18 +1,17 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-flash-functional-tests) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_FLASH=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "Flash API not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-flash-functional-tests | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains hidden or 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,18 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-lp-ticker) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_LPTICKER=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "Low power timer not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-lp-ticker | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
13 changes: 3 additions & 10 deletions
13
hal/tests/TESTS/mbed_hal/minimum_requirements/CMakeLists.txt
This file contains hidden or 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,18 +1,11 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-hal-minimum-requirements) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
include(mbed_greentea) | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-minimum-requirements | ||
TEST_SOURCES | ||
main.cpp | ||
) |
This file contains hidden or 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,18 +1,19 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-mpu) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_MPU=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "MPU API not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-mpu | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains hidden or 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,21 +1,21 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-ospi) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_OSPI=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "OSPI not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-ospi | ||
TEST_SOURCES | ||
main.cpp | ||
ospi_test_utils.cpp | ||
TEST_INCLUDE_DIRS | ||
. | ||
flash_configs | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
This file contains hidden or 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,18 +1,11 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-2021 ARM Limited. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR) | ||
|
||
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../.. CACHE INTERNAL "") | ||
set(TEST_TARGET mbed-hal-pinmap) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
include(mbed_greentea) | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-pinmap | ||
TEST_SOURCES | ||
main.cpp | ||
) |
This file contains hidden or 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 hidden or 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,18 +1,21 @@ | ||
# Copyright (c) 2020 ARM Limited. All rights reserved. | ||
# Copyright (c) 2020-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-hal-reset-reason) | ||
|
||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake) | ||
|
||
project(${TEST_TARGET}) | ||
if(NOT "DEVICE_RESET_REASON=1" IN_LIST MBED_TARGET_DEFINITIONS) | ||
set(TEST_SKIPPED "Reset reason API not supported for this target") | ||
endif() | ||
|
||
mbed_greentea_add_test( | ||
TEST_NAME | ||
${TEST_TARGET} | ||
mbed-hal-reset-reason | ||
TEST_INCLUDE_DIRS | ||
. | ||
TEST_SOURCES | ||
main.cpp | ||
HOST_TESTS_DIR | ||
"${CMAKE_CURRENT_LIST_DIR}/../../host_tests" | ||
TEST_SKIPPED | ||
${TEST_SKIPPED} | ||
) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a lot of directories! I don't really understand what this commit is for after reading the commit message. Could we add a bit more context as to why we need this? Should it be in a separate commit from "Update hal CMake to include greentea test dir"?