From a88438ce04078ebd3172f6fc6836df285cf04d8b Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 13 Aug 2020 16:36:51 +0100 Subject: [PATCH 1/6] Move mbed-trace into platform --- UNITTESTS/CMakeLists.txt | 2 +- UNITTESTS/empty_baseline/unittest.cmake | 2 +- .../drivers/cellular/COMPONENT_STMOD_CELLULAR/README.md | 2 +- drivers/source/SFDP.cpp | 2 +- {features/frameworks => platform}/mbed-trace/.gitignore | 0 {features/frameworks => platform}/mbed-trace/.mbedignore | 0 {features/frameworks => platform}/mbed-trace/CMakeLists.txt | 1 - {features/frameworks => platform}/mbed-trace/CONTRIBUTING.md | 0 {features/frameworks => platform}/mbed-trace/Jenkinsfile | 4 ++-- {features/frameworks => platform}/mbed-trace/LICENSE | 0 .../frameworks => platform}/mbed-trace/Makefile.nanomesh | 0 {features/frameworks => platform}/mbed-trace/README.md | 0 .../mbed-trace/mbed-trace/mbed_trace.h | 0 {features/frameworks => platform}/mbed-trace/mbed_lib.json | 0 .../frameworks => platform}/mbed-trace/source/CMakeLists.txt | 0 .../frameworks => platform}/mbed-trace/source/mbed_trace.c | 0 storage/kvstore/source/FileSystemStore.cpp | 2 +- .../kvstore/tests/UNITTESTS/FileSystemStore/unittest.cmake | 4 ++-- storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake | 4 ++-- 19 files changed, 11 insertions(+), 12 deletions(-) rename {features/frameworks => platform}/mbed-trace/.gitignore (100%) rename {features/frameworks => platform}/mbed-trace/.mbedignore (100%) rename {features/frameworks => platform}/mbed-trace/CMakeLists.txt (99%) rename {features/frameworks => platform}/mbed-trace/CONTRIBUTING.md (100%) rename {features/frameworks => platform}/mbed-trace/Jenkinsfile (98%) rename {features/frameworks => platform}/mbed-trace/LICENSE (100%) rename {features/frameworks => platform}/mbed-trace/Makefile.nanomesh (100%) rename {features/frameworks => platform}/mbed-trace/README.md (100%) rename {features/frameworks => platform}/mbed-trace/mbed-trace/mbed_trace.h (100%) rename {features/frameworks => platform}/mbed-trace/mbed_lib.json (100%) rename {features/frameworks => platform}/mbed-trace/source/CMakeLists.txt (100%) rename {features/frameworks => platform}/mbed-trace/source/mbed_trace.c (100%) diff --git a/UNITTESTS/CMakeLists.txt b/UNITTESTS/CMakeLists.txt index d149c3c8b9..612155a15e 100644 --- a/UNITTESTS/CMakeLists.txt +++ b/UNITTESTS/CMakeLists.txt @@ -114,6 +114,7 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/../features" "${PROJECT_SOURCE_DIR}/../platform/include" "${PROJECT_SOURCE_DIR}/../platform/include/platform" + "${PROJECT_SOURCE_DIR}/../platform/mbed-trace/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include" "${PROJECT_SOURCE_DIR}/../storage/blockdevice/include" @@ -132,7 +133,6 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/../events/source" "${PROJECT_SOURCE_DIR}/../rtos/include" "${PROJECT_SOURCE_DIR}/../features/frameworks" - "${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include" diff --git a/UNITTESTS/empty_baseline/unittest.cmake b/UNITTESTS/empty_baseline/unittest.cmake index 88fc349112..e4b84994aa 100644 --- a/UNITTESTS/empty_baseline/unittest.cmake +++ b/UNITTESTS/empty_baseline/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} .. ../connectivity/mbedtls/include/mbedtls/ ../connectivity/mbedtls/platform/inc/ - ../features/frameworks/mbed-trace/mbed-trace/ + ../platform/mbed-trace/mbed-trace/ ) set(unittest-test-sources diff --git a/connectivity/drivers/cellular/COMPONENT_STMOD_CELLULAR/README.md b/connectivity/drivers/cellular/COMPONENT_STMOD_CELLULAR/README.md index 4ce80705f0..395acc3d7c 100644 --- a/connectivity/drivers/cellular/COMPONENT_STMOD_CELLULAR/README.md +++ b/connectivity/drivers/cellular/COMPONENT_STMOD_CELLULAR/README.md @@ -13,7 +13,7 @@ The STMOD+ Connector specification can be found [here](https://www.st.com/conten ## Debug print -mbed_trace feature is used: https://github.com/ARMmbed/mbed-os/blob/master/features/frameworks/mbed-trace/README.md +mbed_trace feature is used: https://github.com/ARMmbed/mbed-os/blob/master/platform/mbed-trace/README.md Enable it in your mbed_app.json file: diff --git a/drivers/source/SFDP.cpp b/drivers/source/SFDP.cpp index 193c707ff4..745f4b0be7 100644 --- a/drivers/source/SFDP.cpp +++ b/drivers/source/SFDP.cpp @@ -26,7 +26,7 @@ #if (DEVICE_SPI || DEVICE_QSPI) -#include "features/frameworks/mbed-trace/mbed-trace/mbed_trace.h" +#include "platform/mbed-trace/mbed-trace/mbed_trace.h" #define TRACE_GROUP "SFDP" namespace { diff --git a/features/frameworks/mbed-trace/.gitignore b/platform/mbed-trace/.gitignore similarity index 100% rename from features/frameworks/mbed-trace/.gitignore rename to platform/mbed-trace/.gitignore diff --git a/features/frameworks/mbed-trace/.mbedignore b/platform/mbed-trace/.mbedignore similarity index 100% rename from features/frameworks/mbed-trace/.mbedignore rename to platform/mbed-trace/.mbedignore diff --git a/features/frameworks/mbed-trace/CMakeLists.txt b/platform/mbed-trace/CMakeLists.txt similarity index 99% rename from features/frameworks/mbed-trace/CMakeLists.txt rename to platform/mbed-trace/CMakeLists.txt index 86396b4a4c..1b0db50b06 100644 --- a/features/frameworks/mbed-trace/CMakeLists.txt +++ b/platform/mbed-trace/CMakeLists.txt @@ -15,4 +15,3 @@ set (MBED_TRACE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/source/mbed_trace.c) CREATE_LIBRARY(mbedTrace "${MBED_TRACE_SRC}" "") - diff --git a/features/frameworks/mbed-trace/CONTRIBUTING.md b/platform/mbed-trace/CONTRIBUTING.md similarity index 100% rename from features/frameworks/mbed-trace/CONTRIBUTING.md rename to platform/mbed-trace/CONTRIBUTING.md diff --git a/features/frameworks/mbed-trace/Jenkinsfile b/platform/mbed-trace/Jenkinsfile similarity index 98% rename from features/frameworks/mbed-trace/Jenkinsfile rename to platform/mbed-trace/Jenkinsfile index 2793e1c6bc..8ac585c242 100644 --- a/features/frameworks/mbed-trace/Jenkinsfile +++ b/platform/mbed-trace/Jenkinsfile @@ -82,7 +82,7 @@ def morpheusBuildStep(target, compilerLabel, toolchain) { execute("mbed --version") execute("echo https://github.com/armmbed/mbed-os/#6a0a86538c0b9b2bfcc4583b1e2b7fea8f4e71e9 > mbed-os.lib") execute("mbed deploy") - execute("rm -rf ./mbed-os/features/frameworks/mbed-trace") + execute("rm -rf ./mbed-os/platform/mbed-trace") execute("mbed compile -m ${target} -t ${toolchain} --library") setBuildStatus('SUCCESS', "build ${buildName}", "build done") } catch (err) { @@ -102,7 +102,7 @@ def morpheusBuildStep(target, compilerLabel, toolchain) { execute("echo \"https://github.com/ARMmbed/mbed-trace#${env.GIT_COMMIT_HASH}\" > mbed-trace.lib") execute("mbed new .") execute("mbed deploy") - execute("rm -rf ./mbed-os/features/frameworks/mbed-trace") + execute("rm -rf ./mbed-os/platform/mbed-trace") execute("rm -rf ./mbed-trace/example") execute("rm -rf ./mbed-trace/test") execute("mbed compile -t ${toolchain} -m ${target}") diff --git a/features/frameworks/mbed-trace/LICENSE b/platform/mbed-trace/LICENSE similarity index 100% rename from features/frameworks/mbed-trace/LICENSE rename to platform/mbed-trace/LICENSE diff --git a/features/frameworks/mbed-trace/Makefile.nanomesh b/platform/mbed-trace/Makefile.nanomesh similarity index 100% rename from features/frameworks/mbed-trace/Makefile.nanomesh rename to platform/mbed-trace/Makefile.nanomesh diff --git a/features/frameworks/mbed-trace/README.md b/platform/mbed-trace/README.md similarity index 100% rename from features/frameworks/mbed-trace/README.md rename to platform/mbed-trace/README.md diff --git a/features/frameworks/mbed-trace/mbed-trace/mbed_trace.h b/platform/mbed-trace/mbed-trace/mbed_trace.h similarity index 100% rename from features/frameworks/mbed-trace/mbed-trace/mbed_trace.h rename to platform/mbed-trace/mbed-trace/mbed_trace.h diff --git a/features/frameworks/mbed-trace/mbed_lib.json b/platform/mbed-trace/mbed_lib.json similarity index 100% rename from features/frameworks/mbed-trace/mbed_lib.json rename to platform/mbed-trace/mbed_lib.json diff --git a/features/frameworks/mbed-trace/source/CMakeLists.txt b/platform/mbed-trace/source/CMakeLists.txt similarity index 100% rename from features/frameworks/mbed-trace/source/CMakeLists.txt rename to platform/mbed-trace/source/CMakeLists.txt diff --git a/features/frameworks/mbed-trace/source/mbed_trace.c b/platform/mbed-trace/source/mbed_trace.c similarity index 100% rename from features/frameworks/mbed-trace/source/mbed_trace.c rename to platform/mbed-trace/source/mbed_trace.c diff --git a/storage/kvstore/source/FileSystemStore.cpp b/storage/kvstore/source/FileSystemStore.cpp index 828ff5915b..7f5ad5d320 100644 --- a/storage/kvstore/source/FileSystemStore.cpp +++ b/storage/kvstore/source/FileSystemStore.cpp @@ -26,7 +26,7 @@ #include #include -#include "mbed_trace.h" +#include "mbed-trace/mbed_trace.h" #define TRACE_GROUP "FSST" #define FSST_REVISION 1 diff --git a/storage/kvstore/tests/UNITTESTS/FileSystemStore/unittest.cmake b/storage/kvstore/tests/UNITTESTS/FileSystemStore/unittest.cmake index e9246278e9..30230a6aae 100644 --- a/storage/kvstore/tests/UNITTESTS/FileSystemStore/unittest.cmake +++ b/storage/kvstore/tests/UNITTESTS/FileSystemStore/unittest.cmake @@ -5,7 +5,7 @@ set(unittest-includes ${unittest-includes} . .. - ../features/frameworks/mbed-trace/mbed-trace + ../platform/mbed-trace/mbed-trace ) set(unittest-sources @@ -15,7 +15,7 @@ set(unittest-sources ../storage/filesystem/source/Dir.cpp ../storage/filesystem/source/File.cpp ../storage/filesystem/source/FileSystem.cpp - ../features/frameworks/mbed-trace/source/mbed_trace.c + ../platform/mbed-trace/source/mbed_trace.c ../storage/filesystem/littlefs/littlefs/lfs_util.c ../storage/filesystem/littlefs/littlefs/lfs.c ../platform/source/FileBase.cpp diff --git a/storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake b/storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake index 373173ef2d..dccc840777 100644 --- a/storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake +++ b/storage/kvstore/tests/UNITTESTS/TDBStore/unittest.cmake @@ -6,7 +6,7 @@ set(unittest-includes ${unittest-includes} . .. - ../features/frameworks/mbed-trace/mbed-trace + ../platform/mbed-trace/mbed-trace ) set(unittest-sources @@ -14,7 +14,7 @@ set(unittest-sources ../storage/blockdevice/source/HeapBlockDevice.cpp ../storage/blockdevice/source/BufferedBlockDevice.cpp ../storage/kvstore/source/TDBStore.cpp - ../features/frameworks/mbed-trace/source/mbed_trace.c + ../platform/mbed-trace/source/mbed_trace.c stubs/mbed_atomic_stub.c stubs/mbed_assert_stub.cpp stubs/mbed_error.c From af1950fb16a39660d31e08fc3623e2b409d8cc99 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 13 Aug 2020 16:43:56 +0100 Subject: [PATCH 2/6] Add include/ path for mbed-trace --- UNITTESTS/empty_baseline/unittest.cmake | 2 +- drivers/source/SFDP.cpp | 2 +- platform/mbed-trace/{ => include}/mbed-trace/mbed_trace.h | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename platform/mbed-trace/{ => include}/mbed-trace/mbed_trace.h (100%) diff --git a/UNITTESTS/empty_baseline/unittest.cmake b/UNITTESTS/empty_baseline/unittest.cmake index e4b84994aa..34aae47f63 100644 --- a/UNITTESTS/empty_baseline/unittest.cmake +++ b/UNITTESTS/empty_baseline/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} .. ../connectivity/mbedtls/include/mbedtls/ ../connectivity/mbedtls/platform/inc/ - ../platform/mbed-trace/mbed-trace/ + ../platform/mbed-trace/include/mbed-trace/ ) set(unittest-test-sources diff --git a/drivers/source/SFDP.cpp b/drivers/source/SFDP.cpp index 745f4b0be7..5ee31b4f79 100644 --- a/drivers/source/SFDP.cpp +++ b/drivers/source/SFDP.cpp @@ -26,7 +26,7 @@ #if (DEVICE_SPI || DEVICE_QSPI) -#include "platform/mbed-trace/mbed-trace/mbed_trace.h" +#include "mbed-trace/mbed_trace.h" #define TRACE_GROUP "SFDP" namespace { diff --git a/platform/mbed-trace/mbed-trace/mbed_trace.h b/platform/mbed-trace/include/mbed-trace/mbed_trace.h similarity index 100% rename from platform/mbed-trace/mbed-trace/mbed_trace.h rename to platform/mbed-trace/include/mbed-trace/mbed_trace.h From 9b1e0a38fed62b12645e6af40f1df43953329c46 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 13 Aug 2020 16:50:40 +0100 Subject: [PATCH 3/6] Move mbed-client-randlib -> platform/randlib --- .../UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake | 2 +- .../framework/AT/at_cellularinformation/unittest.cmake | 2 +- .../UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake | 2 +- .../UNITTESTS/framework/AT/at_cellularsms/unittest.cmake | 2 +- .../UNITTESTS/framework/AT/at_cellularstack/unittest.cmake | 2 +- .../tests/UNITTESTS/framework/common/util/unittest.cmake | 2 +- .../tests/UNITTESTS/framework/device/athandler/unittest.cmake | 2 +- .../mbed-client-randlib => platform/randlib}/.gitignore | 0 .../mbed-client-randlib => platform/randlib}/.mbedignore | 0 .../mbed-client-randlib => platform/randlib}/.yotta_ignore | 0 .../mbed-client-randlib => platform/randlib}/LICENSE | 0 .../mbed-client-randlib => platform/randlib}/Makefile | 0 .../mbed-client-randlib => platform/randlib}/apache-2.0.txt | 0 .../randlib}/mbed-client-randlib/platform/arm_hal_random.h | 0 .../randlib}/mbed-client-randlib/randLIB.h | 0 .../mbed-client-randlib => platform/randlib}/mbed_lib.json | 0 .../mbed-client-randlib => platform/randlib}/source/randLIB.c | 0 .../randlib}/test/mbed-client-randlib/unittest/Makefile | 4 ++-- .../test/mbed-client-randlib/unittest/MakefileWorker.mk | 4 ++-- .../test/mbed-client-randlib/unittest/makefile_defines.txt | 0 .../test/mbed-client-randlib/unittest/randlib/Makefile | 1 - .../test/mbed-client-randlib/unittest/randlib/main.cpp | 1 - .../test/mbed-client-randlib/unittest/randlib/randlibtest.cpp | 0 .../test/mbed-client-randlib/unittest/randlib/test_randlib.c | 0 .../test/mbed-client-randlib/unittest/randlib/test_randlib.h | 1 - .../randlib}/test/mbed-client-randlib/unittest/run_tests | 0 .../test/mbed-client-randlib/unittest/stubs/open_stub.c | 0 .../test/mbed-client-randlib/unittest/stubs/random_stub.c | 0 28 files changed, 11 insertions(+), 14 deletions(-) rename {features/frameworks/mbed-client-randlib => platform/randlib}/.gitignore (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/.mbedignore (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/.yotta_ignore (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/LICENSE (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/Makefile (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/apache-2.0.txt (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/mbed-client-randlib/platform/arm_hal_random.h (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/mbed-client-randlib/randLIB.h (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/mbed_lib.json (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/source/randLIB.c (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/Makefile (98%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/MakefileWorker.mk (99%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/makefile_defines.txt (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/randlib/Makefile (99%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/randlib/main.cpp (99%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/randlib/test_randlib.c (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/randlib/test_randlib.h (99%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/run_tests (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/stubs/open_stub.c (100%) rename {features/frameworks/mbed-client-randlib => platform/randlib}/test/mbed-client-randlib/unittest/stubs/random_stub.c (100%) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake index 96ce3752e2..b13860c113 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/device - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ../drivers ../hal ) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake index 91917ec709..4ab4102994 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake index 7d714b550c..4da258ae29 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake index 071c447b4b..f8497b212c 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake index 7fdfcee988..bffa2ec89a 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake index 7116a1d85d..2f814c58a4 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake @@ -7,7 +7,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake index da1bb40f2d..871fcad249 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../features/frameworks/mbed-client-randlib/mbed-client-randlib + ../platform/randlib/mbed-client-randlib ) diff --git a/features/frameworks/mbed-client-randlib/.gitignore b/platform/randlib/.gitignore similarity index 100% rename from features/frameworks/mbed-client-randlib/.gitignore rename to platform/randlib/.gitignore diff --git a/features/frameworks/mbed-client-randlib/.mbedignore b/platform/randlib/.mbedignore similarity index 100% rename from features/frameworks/mbed-client-randlib/.mbedignore rename to platform/randlib/.mbedignore diff --git a/features/frameworks/mbed-client-randlib/.yotta_ignore b/platform/randlib/.yotta_ignore similarity index 100% rename from features/frameworks/mbed-client-randlib/.yotta_ignore rename to platform/randlib/.yotta_ignore diff --git a/features/frameworks/mbed-client-randlib/LICENSE b/platform/randlib/LICENSE similarity index 100% rename from features/frameworks/mbed-client-randlib/LICENSE rename to platform/randlib/LICENSE diff --git a/features/frameworks/mbed-client-randlib/Makefile b/platform/randlib/Makefile similarity index 100% rename from features/frameworks/mbed-client-randlib/Makefile rename to platform/randlib/Makefile diff --git a/features/frameworks/mbed-client-randlib/apache-2.0.txt b/platform/randlib/apache-2.0.txt similarity index 100% rename from features/frameworks/mbed-client-randlib/apache-2.0.txt rename to platform/randlib/apache-2.0.txt diff --git a/features/frameworks/mbed-client-randlib/mbed-client-randlib/platform/arm_hal_random.h b/platform/randlib/mbed-client-randlib/platform/arm_hal_random.h similarity index 100% rename from features/frameworks/mbed-client-randlib/mbed-client-randlib/platform/arm_hal_random.h rename to platform/randlib/mbed-client-randlib/platform/arm_hal_random.h diff --git a/features/frameworks/mbed-client-randlib/mbed-client-randlib/randLIB.h b/platform/randlib/mbed-client-randlib/randLIB.h similarity index 100% rename from features/frameworks/mbed-client-randlib/mbed-client-randlib/randLIB.h rename to platform/randlib/mbed-client-randlib/randLIB.h diff --git a/features/frameworks/mbed-client-randlib/mbed_lib.json b/platform/randlib/mbed_lib.json similarity index 100% rename from features/frameworks/mbed-client-randlib/mbed_lib.json rename to platform/randlib/mbed_lib.json diff --git a/features/frameworks/mbed-client-randlib/source/randLIB.c b/platform/randlib/source/randLIB.c similarity index 100% rename from features/frameworks/mbed-client-randlib/source/randLIB.c rename to platform/randlib/source/randLIB.c diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/Makefile b/platform/randlib/test/mbed-client-randlib/unittest/Makefile similarity index 98% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/Makefile rename to platform/randlib/test/mbed-client-randlib/unittest/Makefile index b353517548..91cfcf981d 100644 --- a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/Makefile +++ b/platform/randlib/test/mbed-client-randlib/unittest/Makefile @@ -5,11 +5,11 @@ clean: else DIRS := $(filter-out ./, $(sort $(dir $(shell find . -name 'Makefile')))) -all: +all: for dir in $(DIRS); do \ cd $$dir; make gcov; cd ..;\ done - + clean: for dir in $(DIRS); do \ cd $$dir; make clean; cd ..;\ diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk b/platform/randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk similarity index 99% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk rename to platform/randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk index 2096ced036..2bfbec0c82 100644 --- a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk +++ b/platform/randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk @@ -261,7 +261,7 @@ ifeq ($(CPPUTEST_USE_MEM_LEAK_DETECTION), N) CPPUTEST_CPPFLAGS += -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED else ifndef CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE - CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h + CPPUTEST_MEMLEAK_DETECTOR_NEW_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorNewMacros.h endif ifndef CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE CPPUTEST_MEMLEAK_DETECTOR_MALLOC_MACRO_FILE = -include $(CPPUTEST_HOME)/include/CppUTest/MemoryLeakDetectorMallocMacros.h @@ -270,7 +270,7 @@ endif ifeq ($(CPPUTEST_ENABLE_DEBUG), Y) CPPUTEST_CXXFLAGS += -g - CPPUTEST_CFLAGS += -g + CPPUTEST_CFLAGS += -g CPPUTEST_LDFLAGS += -g endif diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/makefile_defines.txt b/platform/randlib/test/mbed-client-randlib/unittest/makefile_defines.txt similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/makefile_defines.txt rename to platform/randlib/test/mbed-client-randlib/unittest/makefile_defines.txt diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/Makefile b/platform/randlib/test/mbed-client-randlib/unittest/randlib/Makefile similarity index 99% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/Makefile rename to platform/randlib/test/mbed-client-randlib/unittest/randlib/Makefile index 12d97840f6..759be85d90 100644 --- a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/Makefile +++ b/platform/randlib/test/mbed-client-randlib/unittest/randlib/Makefile @@ -15,4 +15,3 @@ TEST_SRC_FILES = \ include ../MakefileWorker.mk CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT -DRANDLIB_PRNG - diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/main.cpp b/platform/randlib/test/mbed-client-randlib/unittest/randlib/main.cpp similarity index 99% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/main.cpp rename to platform/randlib/test/mbed-client-randlib/unittest/randlib/main.cpp index becceb65ca..2ace856ecd 100644 --- a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/main.cpp +++ b/platform/randlib/test/mbed-client-randlib/unittest/randlib/main.cpp @@ -12,4 +12,3 @@ int main(int ac, char **av) } IMPORT_TEST_GROUP(randLIB); - diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp b/platform/randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp rename to platform/randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c b/platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c rename to platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h b/platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h similarity index 99% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h rename to platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h index a1949e6d05..54909d470f 100644 --- a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h +++ b/platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h @@ -32,4 +32,3 @@ bool test_randLIB_randomise_base(); #endif #endif // TEST_RANDLIB_H - diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/run_tests b/platform/randlib/test/mbed-client-randlib/unittest/run_tests similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/run_tests rename to platform/randlib/test/mbed-client-randlib/unittest/run_tests diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c b/platform/randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c rename to platform/randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c diff --git a/features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c b/platform/randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c similarity index 100% rename from features/frameworks/mbed-client-randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c rename to platform/randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c From d6a2269de3f967a266331131f63bc5199aefeda5 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Thu, 13 Aug 2020 17:13:32 +0100 Subject: [PATCH 4/6] Restructure platform/randlib * Move mbed-client-randlib/ headers into include/ (Note: we don't rename it to "randlib" because this library is mirrored to https://github.com/ARMmbed/mbed-client-randlib, and "mbed-client-randlib" may be reference by some projects) * Move the standalone local unit test into tests/unit --- .../UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake | 2 +- .../framework/AT/at_cellularinformation/unittest.cmake | 2 +- .../UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake | 2 +- .../tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake | 2 +- .../UNITTESTS/framework/AT/at_cellularstack/unittest.cmake | 2 +- .../tests/UNITTESTS/framework/common/util/unittest.cmake | 2 +- .../tests/UNITTESTS/framework/device/athandler/unittest.cmake | 2 +- platform/randlib/.mbedignore | 2 +- platform/randlib/.yotta_ignore | 2 +- .../{ => include}/mbed-client-randlib/platform/arm_hal_random.h | 0 platform/randlib/{ => include}/mbed-client-randlib/randLIB.h | 0 .../{test/mbed-client-randlib/unittest => tests/unit}/Makefile | 0 .../unittest => tests/unit}/MakefileWorker.mk | 0 .../unittest => tests/unit}/makefile_defines.txt | 0 .../unittest => tests/unit}/randlib/Makefile | 0 .../unittest => tests/unit}/randlib/main.cpp | 0 .../unittest => tests/unit}/randlib/randlibtest.cpp | 0 .../unittest => tests/unit}/randlib/test_randlib.c | 0 .../unittest => tests/unit}/randlib/test_randlib.h | 0 .../{test/mbed-client-randlib/unittest => tests/unit}/run_tests | 0 .../unittest => tests/unit}/stubs/open_stub.c | 0 .../unittest => tests/unit}/stubs/random_stub.c | 0 22 files changed, 9 insertions(+), 9 deletions(-) rename platform/randlib/{ => include}/mbed-client-randlib/platform/arm_hal_random.h (100%) rename platform/randlib/{ => include}/mbed-client-randlib/randLIB.h (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/Makefile (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/MakefileWorker.mk (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/makefile_defines.txt (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/randlib/Makefile (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/randlib/main.cpp (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/randlib/randlibtest.cpp (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/randlib/test_randlib.c (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/randlib/test_randlib.h (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/run_tests (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/stubs/open_stub.c (100%) rename platform/randlib/{test/mbed-client-randlib/unittest => tests/unit}/stubs/random_stub.c (100%) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake index b13860c113..20bc316880 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellulardevice/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT ../connectivity/cellular/include/cellular/framework/device - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ../drivers ../hal ) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake index 4ab4102994..fad602356c 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularinformation/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake index 4da258ae29..07c7b9c438 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularnetwork/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake index f8497b212c..dc344876f9 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularsms/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake index bffa2ec89a..97fe9a230b 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularstack/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake index 2f814c58a4..556c12a261 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/common/util/unittest.cmake @@ -7,7 +7,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) # Source files diff --git a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake index 871fcad249..8a787df9c7 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake +++ b/connectivity/cellular/tests/UNITTESTS/framework/device/athandler/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../connectivity/cellular/tests/UNITTESTS/framework/common/util ../connectivity/cellular/include/cellular/framework/common ../connectivity/cellular/include/cellular/framework/AT - ../platform/randlib/mbed-client-randlib + ../platform/randlib/include/mbed-client-randlib ) diff --git a/platform/randlib/.mbedignore b/platform/randlib/.mbedignore index ba4eb1b31d..89e8a0a755 100644 --- a/platform/randlib/.mbedignore +++ b/platform/randlib/.mbedignore @@ -1,2 +1,2 @@ linux/* -test/* +tests/unit/* diff --git a/platform/randlib/.yotta_ignore b/platform/randlib/.yotta_ignore index ab1cfb4ef2..13fec05b8a 100644 --- a/platform/randlib/.yotta_ignore +++ b/platform/randlib/.yotta_ignore @@ -1 +1 @@ -test/* +tests/unit/* diff --git a/platform/randlib/mbed-client-randlib/platform/arm_hal_random.h b/platform/randlib/include/mbed-client-randlib/platform/arm_hal_random.h similarity index 100% rename from platform/randlib/mbed-client-randlib/platform/arm_hal_random.h rename to platform/randlib/include/mbed-client-randlib/platform/arm_hal_random.h diff --git a/platform/randlib/mbed-client-randlib/randLIB.h b/platform/randlib/include/mbed-client-randlib/randLIB.h similarity index 100% rename from platform/randlib/mbed-client-randlib/randLIB.h rename to platform/randlib/include/mbed-client-randlib/randLIB.h diff --git a/platform/randlib/test/mbed-client-randlib/unittest/Makefile b/platform/randlib/tests/unit/Makefile similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/Makefile rename to platform/randlib/tests/unit/Makefile diff --git a/platform/randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk b/platform/randlib/tests/unit/MakefileWorker.mk similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/MakefileWorker.mk rename to platform/randlib/tests/unit/MakefileWorker.mk diff --git a/platform/randlib/test/mbed-client-randlib/unittest/makefile_defines.txt b/platform/randlib/tests/unit/makefile_defines.txt similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/makefile_defines.txt rename to platform/randlib/tests/unit/makefile_defines.txt diff --git a/platform/randlib/test/mbed-client-randlib/unittest/randlib/Makefile b/platform/randlib/tests/unit/randlib/Makefile similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/randlib/Makefile rename to platform/randlib/tests/unit/randlib/Makefile diff --git a/platform/randlib/test/mbed-client-randlib/unittest/randlib/main.cpp b/platform/randlib/tests/unit/randlib/main.cpp similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/randlib/main.cpp rename to platform/randlib/tests/unit/randlib/main.cpp diff --git a/platform/randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp b/platform/randlib/tests/unit/randlib/randlibtest.cpp similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/randlib/randlibtest.cpp rename to platform/randlib/tests/unit/randlib/randlibtest.cpp diff --git a/platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c b/platform/randlib/tests/unit/randlib/test_randlib.c similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.c rename to platform/randlib/tests/unit/randlib/test_randlib.c diff --git a/platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h b/platform/randlib/tests/unit/randlib/test_randlib.h similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/randlib/test_randlib.h rename to platform/randlib/tests/unit/randlib/test_randlib.h diff --git a/platform/randlib/test/mbed-client-randlib/unittest/run_tests b/platform/randlib/tests/unit/run_tests similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/run_tests rename to platform/randlib/tests/unit/run_tests diff --git a/platform/randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c b/platform/randlib/tests/unit/stubs/open_stub.c similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/stubs/open_stub.c rename to platform/randlib/tests/unit/stubs/open_stub.c diff --git a/platform/randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c b/platform/randlib/tests/unit/stubs/random_stub.c similarity index 100% rename from platform/randlib/test/mbed-client-randlib/unittest/stubs/random_stub.c rename to platform/randlib/tests/unit/stubs/random_stub.c From 71eecfc7c85a3b79527197ce6906e5e6d0baf826 Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Fri, 21 Aug 2020 17:45:56 +0100 Subject: [PATCH 5/6] .codecheckignore: ignore imported libraries randlib and mbed-trace --- .codecheckignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.codecheckignore b/.codecheckignore index 51c45db48a..2504e1191b 100644 --- a/.codecheckignore +++ b/.codecheckignore @@ -22,6 +22,8 @@ ^platform/cxxsupport ^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_MBED_PSA_SRV ^platform/FEATURE_EXPERIMENTAL_API/FEATURE_PSA/TARGET_TFM +^platform/mbed-trace +^platform/randlib ^platform/tests/UNITTESTS ^events/tests/UNITTESTS ^rtos/source/TARGET_CORTEX/rtx4 @@ -31,4 +33,4 @@ ^UNITTESTS ^storage/blockdevice/tests/UNITTESTS ^storage/kvstore/tests/UNITTESTS -^drivers/tests/UNITTESTS \ No newline at end of file +^drivers/tests/UNITTESTS From 183ca7729c37d4fd429814938cfee69e3f180b6d Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Wed, 2 Sep 2020 15:50:13 +0100 Subject: [PATCH 6/6] drivers/SFDP should compile without mbed-trace The library "drivers" is a core one available to bare metal. It should not depend on mbed-trace which is an optional library. --- drivers/source/SFDP.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/source/SFDP.cpp b/drivers/source/SFDP.cpp index 5ee31b4f79..3c461b5cf5 100644 --- a/drivers/source/SFDP.cpp +++ b/drivers/source/SFDP.cpp @@ -26,8 +26,14 @@ #if (DEVICE_SPI || DEVICE_QSPI) +#if MBED_CONF_MBED_TRACE_ENABLE #include "mbed-trace/mbed_trace.h" #define TRACE_GROUP "SFDP" +#else // MBED_CONF_MBED_TRACE_ENABLE +#define tr_info(...) +#define tr_error(...) +#define tr_debug(...) +#endif // MBED_CONF_MBED_TRACE_ENABLE namespace {