diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 7b39b4b1..a7ecda95 100755 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -xe + # Enter repository root cd "$( dirname "${BASH_SOURCE[0]}" )"/.. @@ -26,7 +28,7 @@ then else # git clone https://github.com/ARMmbed/mbed-os.git # Use feature branch until merged to master - git clone --depth 1 https://github.com/paul-szczepanek-arm/mbed-os.git -b unittest dependencies/mbed-os + git clone --depth 1 https://github.com/paul-szczepanek-arm/mbed-os.git -b cmake-ble-rebased dependencies/mbed-os fi # Add symlinks diff --git a/tests/UNITTESTS/CMakeLists.txt b/tests/UNITTESTS/CMakeLists.txt index 38569c88..656ca6fd 100644 --- a/tests/UNITTESTS/CMakeLists.txt +++ b/tests/UNITTESTS/CMakeLists.txt @@ -2,14 +2,14 @@ # SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.0.2) -set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") set(SERVICES_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../services CACHE INTERNAL "") +set(mbed-os_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/mbed-os CACHE INTERNAL "") project(unittests) -enable_testing() - -add_subdirectory(${MBED_PATH}/UNITTESTS) +include(CTest) +add_subdirectory(mbed-os/UNITTESTS) add_subdirectory(Template) add_subdirectory(LinkLoss) +add_subdirectory(DeviceInformation) diff --git a/tests/UNITTESTS/DeviceInformation/CMakeLists.txt b/tests/UNITTESTS/DeviceInformation/CMakeLists.txt index d1ae05b6..4c28e7ab 100644 --- a/tests/UNITTESTS/DeviceInformation/CMakeLists.txt +++ b/tests/UNITTESTS/DeviceInformation/CMakeLists.txt @@ -10,7 +10,7 @@ target_include_directories(${TEST_NAME} PRIVATE . ${SERVICES_PATH}/DeviceInformation/include - ${MBED_PATH}/connectivity/FEATURE_BLE/include/ble/gap + ${mbed-os_SOURCE_DIR}/connectivity/FEATURE_BLE/include/ble/gap ) target_sources(${TEST_NAME} diff --git a/tests/UNITTESTS/LinkLoss/test_LinkLossService.cpp b/tests/UNITTESTS/LinkLoss/test_LinkLossService.cpp index ca784526..b297590d 100644 --- a/tests/UNITTESTS/LinkLoss/test_LinkLossService.cpp +++ b/tests/UNITTESTS/LinkLoss/test_LinkLossService.cpp @@ -23,7 +23,7 @@ #include "ble/gap/ChainableGapEventHandler.h" #include "ble-service-link-loss/LinkLossService.h" -#include "Events.h" +#include "ble/gap/Events.h" #include "ble_mocks.h" #include "events/EventQueue.h"