Skip to content

Commit 025be19

Browse files
authored
Merge pull request #14090 from hugueskamba/hk_cmake_greentea_blockdevice
CMake: Add support for Blockdevice Greentea tests
2 parents 36a2a80 + d42e928 commit 025be19

File tree

6 files changed

+132
-0
lines changed

6 files changed

+132
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-buffered_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-blockdevice
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-flashsim_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-blockdevice
17+
)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-general_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
if("DATAFLASH" IN_LIST MBED_TARGET_LABELS)
14+
list(APPEND mbed_blockdevice_libs mbed-storage-dataflash)
15+
endif()
16+
17+
if("FLASHIAP" IN_LIST MBED_TARGET_LABELS)
18+
list(APPEND mbed_blockdevice_libs mbed-storage-flashiap)
19+
endif()
20+
21+
if("I2CEE" IN_LIST MBED_TARGET_LABELS)
22+
list(APPEND mbed_blockdevice_libs mbed-storage-i2cee)
23+
endif()
24+
25+
if("OSPIF" IN_LIST MBED_TARGET_LABELS)
26+
list(APPEND mbed_blockdevice_libs mbed-storage-ospif)
27+
endif()
28+
29+
if("QSPIF" IN_LIST MBED_TARGET_LABELS)
30+
list(APPEND mbed_blockdevice_libs mbed-storage-qspif)
31+
endif()
32+
33+
if("SD" IN_LIST MBED_TARGET_LABELS)
34+
list(APPEND mbed_blockdevice_libs mbed-storage-sd)
35+
endif()
36+
37+
if("SPIF" IN_LIST MBED_TARGET_LABELS)
38+
list(APPEND mbed_blockdevice_libs mbed-storage-spif)
39+
endif()
40+
41+
mbed_greentea_cmake_macro(
42+
TEST_NAME ${TEST_TARGET}
43+
TEST_REQUIRED_LIBS
44+
mbed-storage-blockdevice
45+
mbed-storage
46+
${mbed_blockdevice_libs}
47+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-heap_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-blockdevice
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-mbr_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-blockdevice
17+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2020 ARM Limited. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5+
6+
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7+
set(TEST_TARGET mbed-storage-blockdevice-util_block_device)
8+
9+
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10+
11+
project(${TEST_TARGET})
12+
13+
mbed_greentea_cmake_macro(
14+
TEST_NAME ${TEST_TARGET}
15+
TEST_REQUIRED_LIBS
16+
mbed-storage-blockdevice
17+
)

0 commit comments

Comments
 (0)