mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #15095 from LDong-Arm/ctest_nfc
CMake: greentea: Migrate the NFC EEPROM test to CTestpull/15116/head
commit
ff6d401a86
|
@ -24,7 +24,17 @@ add_library(mbed-nfc INTERFACE)
|
||||||
add_library(mbed-ppp INTERFACE)
|
add_library(mbed-ppp INTERFACE)
|
||||||
add_library(mbed-wifi INTERFACE)
|
add_library(mbed-wifi INTERFACE)
|
||||||
|
|
||||||
if(${CMAKE_CROSSCOMPILING})
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||||
|
# Add these subdirectories for tests
|
||||||
|
add_subdirectory(cellular)
|
||||||
|
add_subdirectory(drivers)
|
||||||
|
add_subdirectory(FEATURE_BLE)
|
||||||
|
add_subdirectory(libraries)
|
||||||
|
add_subdirectory(lorawan)
|
||||||
|
add_subdirectory(mbedtls)
|
||||||
|
add_subdirectory(netsocket)
|
||||||
|
add_subdirectory(nfc)
|
||||||
|
else()
|
||||||
# The directories below contain optional target libraries
|
# The directories below contain optional target libraries
|
||||||
add_subdirectory(FEATURE_BLE EXCLUDE_FROM_ALL)
|
add_subdirectory(FEATURE_BLE EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(cellular EXCLUDE_FROM_ALL)
|
add_subdirectory(cellular EXCLUDE_FROM_ALL)
|
||||||
|
@ -36,12 +46,4 @@ if(${CMAKE_CROSSCOMPILING})
|
||||||
add_subdirectory(nanostack EXCLUDE_FROM_ALL)
|
add_subdirectory(nanostack EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(netsocket EXCLUDE_FROM_ALL)
|
add_subdirectory(netsocket EXCLUDE_FROM_ALL)
|
||||||
add_subdirectory(nfc EXCLUDE_FROM_ALL)
|
add_subdirectory(nfc EXCLUDE_FROM_ALL)
|
||||||
else()
|
|
||||||
# Add these subdirectories for the Unit test
|
|
||||||
add_subdirectory(cellular)
|
|
||||||
add_subdirectory(lorawan)
|
|
||||||
add_subdirectory(netsocket)
|
|
||||||
add_subdirectory(mbedtls)
|
|
||||||
add_subdirectory(libraries)
|
|
||||||
add_subdirectory(FEATURE_BLE)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||||
add_subdirectory(tests/UNITTESTS)
|
if(NOT BUILD_GREENTEA_TESTS)
|
||||||
|
add_subdirectory(tests/UNITTESTS)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(libraries)
|
add_subdirectory(libraries)
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||||
add_subdirectory(tests/UNITTESTS)
|
if(NOT BUILD_GREENTEA_TESTS)
|
||||||
|
add_subdirectory(tests/UNITTESTS)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_subdirectory(mbed-coap)
|
add_subdirectory(mbed-coap)
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||||
add_subdirectory(tests/UNITTESTS)
|
if(NOT BUILD_GREENTEA_TESTS)
|
||||||
|
add_subdirectory(tests/UNITTESTS)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_include_directories(mbed-mbedtls
|
target_include_directories(mbed-mbedtls
|
||||||
|
|
|
@ -3,6 +3,12 @@
|
||||||
|
|
||||||
add_subdirectory(libraries)
|
add_subdirectory(libraries)
|
||||||
|
|
||||||
|
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING)
|
||||||
|
if(BUILD_GREENTEA_TESTS)
|
||||||
|
add_subdirectory(tests/TESTS)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(mbed-nfc
|
target_include_directories(mbed-nfc
|
||||||
INTERFACE
|
INTERFACE
|
||||||
.
|
.
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
# Copyright (c) 2021 ARM Limited. All rights reserved.
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
add_subdirectory(nfc/eeprom)
|
|
@ -1,20 +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
|
# 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 "")
|
if(NOT "MBED_CONF_NFCEEPROM=1" IN_LIST MBED_CONFIG_DEFINITIONS)
|
||||||
set(TEST_TARGET mbed-connectivity-nfc-eeprom)
|
set(TEST_SKIPPED "NFC EEPROM required")
|
||||||
|
endif()
|
||||||
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
|
|
||||||
|
|
||||||
project(${TEST_TARGET})
|
|
||||||
|
|
||||||
mbed_greentea_add_test(
|
mbed_greentea_add_test(
|
||||||
TEST_NAME
|
TEST_NAME
|
||||||
${TEST_TARGET}
|
mbed-connectivity-nfc-eeprom
|
||||||
TEST_SOURCES
|
TEST_SOURCES
|
||||||
main.cpp
|
main.cpp
|
||||||
TEST_REQUIRED_LIBS
|
TEST_REQUIRED_LIBS
|
||||||
mbed-nfc
|
mbed-nfc
|
||||||
|
TEST_SKIPPED
|
||||||
|
${TEST_SKIPPED}
|
||||||
)
|
)
|
||||||
|
|
|
@ -3920,7 +3920,8 @@
|
||||||
],
|
],
|
||||||
"extra_labels_add": [
|
"extra_labels_add": [
|
||||||
"CORDIO",
|
"CORDIO",
|
||||||
"MX25R6435F"
|
"MX25R6435F",
|
||||||
|
"M24SR"
|
||||||
],
|
],
|
||||||
"supported_form_factors": [
|
"supported_form_factors": [
|
||||||
"ARDUINO_UNO"
|
"ARDUINO_UNO"
|
||||||
|
|
|
@ -247,7 +247,7 @@ class _GccParser(_Parser):
|
||||||
class _ArmccParser(_Parser):
|
class _ArmccParser(_Parser):
|
||||||
RE = re.compile(
|
RE = re.compile(
|
||||||
r'^\s+0x(\w{8})\s+0x(\w{8})\s+(\w+)\s+(\w+)\s+(\d+)\s+[*]?.+\s+(.+)$')
|
r'^\s+0x(\w{8})\s+0x(\w{8})\s+(\w+)\s+(\w+)\s+(\d+)\s+[*]?.+\s+(.+)$')
|
||||||
RE_OBJECT = re.compile(r'(.+\.(l|ar))\((.+\.o(bj)?)\)')
|
RE_OBJECT = re.compile(r'(.+\.(l|a|ar))\((.+\.o(bj)?)\)')
|
||||||
OBJECT_EXTENSIONS = (".o", ".obj")
|
OBJECT_EXTENSIONS = (".o", ".obj")
|
||||||
|
|
||||||
def parse_object_name(self, line):
|
def parse_object_name(self, line):
|
||||||
|
|
Loading…
Reference in New Issue