Skip to content

Commit f3ce38e

Browse files
author
Seppo Takalo
committed
Add empty unittest to generate zero baseline for untested files.
1 parent e4b1509 commit f3ce38e

File tree

7 files changed

+77
-17
lines changed

7 files changed

+77
-17
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/* Copyright (c) 2019 ARM Limited
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include "gtest/gtest.h"
18+
19+
/*
20+
* Purpose of this test is just to be empty baseline
21+
* that does nothing, but includes all source files
22+
* in the build.
23+
* Do not add any tests here
24+
*/
25+
26+
class EmptyBaseline : public testing::Test {
27+
virtual void SetUp()
28+
{
29+
}
30+
31+
virtual void TearDown()
32+
{
33+
}
34+
};
35+
36+
TEST_F(EmptyBaseline, constructor)
37+
{
38+
EXPECT_TRUE(true);
39+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
####################
3+
# UNIT TESTS
4+
####################
5+
6+
set(unittest-includes ${unittest-includes}
7+
.
8+
..
9+
../features/mbedtls/mbed-crypto/inc/mbedtls/
10+
../features/mbedtls/platform/inc/
11+
../features/frameworks/mbed-trace/mbed-trace/
12+
)
13+
14+
set(unittest-sources
15+
../features/device_key/source/DeviceKey.cpp
16+
)
17+
18+
set(unittest-test-sources
19+
empty_baseline/empty_baseline.cpp
20+
)
21+
22+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DMBED_CONF_PLATFORM_CTHUNK_COUNT_MAX=10 -DDEVICE_ANALOGIN -DDEVICE_ANALOGOUT -DDEVICE_CAN -DDEVICE_CRC -DDEVICE_ETHERNET -DDEVICE_FLASH -DDEVICE_I2C -DDEVICE_I2CSLAVE -DDEVICE_I2C_ASYNCH -DDEVICE_INTERRUPTIN -DDEVICE_LPTICKER -DDEVICE_PORTIN -DDEVICE_PORTINOUT -DDEVICE_PORTOUT -DDEVICE_PWMOUT -DDEVICE_QSPI -DDEVICE_SERIAL -DDEVICE_SERIAL_ASYNCH -DDEVICE_SERIAL_FC -DDEVICE_SPI -DDEVICE_SPISLAVE -DDEVICE_SPI_ASYNCH -DDEVICE_FLASH -DCOMPONENT_FLASHIAP")
23+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DMBED_CONF_PLATFORM_CTHUNK_COUNT_MAX=10 -DDEVICE_ANALOGIN -DDEVICE_ANALOGOUT -DDEVICE_CAN -DDEVICE_CRC -DDEVICE_ETHERNET -DDEVICE_FLASH -DDEVICE_I2C -DDEVICE_I2CSLAVE -DDEVICE_I2C_ASYNCH -DDEVICE_INTERRUPTIN -DDEVICE_LPTICKER -DDEVICE_PORTIN -DDEVICE_PORTINOUT -DDEVICE_PORTOUT -DDEVICE_PWMOUT -DDEVICE_QSPI -DDEVICE_SERIAL -DDEVICE_SERIAL_ASYNCH -DDEVICE_SERIAL_FC -DDEVICE_SPI -DDEVICE_SPISLAVE -DDEVICE_SPI_ASYNCH -DDEVICE_FLASH -DCOMPONENT_FLASHIAP")

features/device_key/source/DeviceKey.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@
2020
#include "mbedtls/config.h"
2121
#include "mbedtls/cmac.h"
2222
#include "mbedtls/platform.h"
23-
#include "KVStore.h"
24-
#include "TDBStore.h"
25-
#include "KVMap.h"
26-
#include "kv_config.h"
23+
#include "features/storage/kvstore/include/KVStore.h"
24+
#include "features/storage/kvstore/tdbstore/TDBStore.h"
25+
#include "features/storage/kvstore/kv_map/KVMap.h"
26+
#include "features/storage/kvstore/conf/kv_config.h"
2727
#include "mbed_wait_api.h"
28-
#include "stdlib.h"
28+
#include <stdlib.h>
2929
#include "platform/mbed_error.h"
3030
#include <string.h>
3131
#include "entropy.h"
32-
#include "platform_mbed.h"
3332
#include "mbed_trace.h"
34-
#include "ssl_internal.h"
3533

3634
#define TRACE_GROUP "DEVKEY"
3735

features/storage/filesystem/FileSystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "platform/FileHandle.h"
2424
#include "platform/DirHandle.h"
2525
#include "platform/FileSystemLike.h"
26-
#include "BlockDevice.h"
26+
#include "features/storage/blockdevice/BlockDevice.h"
2727

2828
namespace mbed {
2929
/** \addtogroup file system */

features/storage/kvstore/kv_map/KVMap.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include "KVStore.h"
18-
#include "KVMap.h"
19-
#include "kv_config.h"
17+
#include "features/storage/kvstore/include/KVStore.h"
18+
#include "features/storage/kvstore/kv_map/KVMap.h"
19+
#include "features/storage/kvstore/conf/kv_config.h"
2020
#include <stdlib.h>
2121
#include "string.h"
2222
#include "mbed_error.h"

features/storage/kvstore/kv_map/KVMap.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
#ifndef _KV_MAP
1717
#define _KV_MAP
1818

19-
#include "KVStore.h"
19+
#include "features/storage/kvstore/include/KVStore.h"
2020
#include "platform/PlatformMutex.h"
2121
#include "platform/SingletonPtr.h"
22-
#include "BlockDevice.h"
23-
#include "FileSystem.h"
22+
#include "features/storage/blockdevice/BlockDevice.h"
23+
#include "features/storage/filesystem/FileSystem.h"
2424

2525
namespace mbed {
2626

features/storage/kvstore/tdbstore/TDBStore.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
#include <stdint.h>
2121
#include <stdio.h>
22-
#include "KVStore.h"
23-
#include "BlockDevice.h"
24-
#include "BufferedBlockDevice.h"
22+
#include "features/storage/kvstore/include/KVStore.h"
23+
#include "features/storage/blockdevice/BlockDevice.h"
24+
#include "features/storage/blockdevice/BufferedBlockDevice.h"
2525
#include "PlatformMutex.h"
2626

2727
namespace mbed {

0 commit comments

Comments
 (0)