Skip to content

Commit 9bfcb95

Browse files
authored
Merge pull request ARMmbed#11943 from 0xc0170/integration-tests-split
Split integration tests in fs/net
2 parents 27012ff + a542e02 commit 9bfcb95

File tree

7 files changed

+49
-28
lines changed

7 files changed

+49
-28
lines changed

TESTS/integration/COMMON/common_defines_test.h renamed to TESTS/integration/COMMON/common_defines_fs_test.h

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,6 @@
2020

2121
#define TRACE_GROUP "GRNT"
2222

23-
#define ETHERNET 1
24-
#define WIFI 2
25-
#define MESH 3
26-
#define CELLULAR 4
27-
28-
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE)
29-
#error [NOT_SUPPORTED] No network interface found on this target.
30-
#endif
31-
32-
#if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == ETHERNET
33-
#define TEST_NETWORK_TYPE "Ethernet"
34-
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI
35-
#define TEST_NETWORK_TYPE "WiFi"
36-
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == MESH
37-
#define TEST_NETWORK_TYPE "Mesh"
38-
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
39-
#define TEST_NETWORK_TYPE "Cellular"
40-
#else
41-
#error [NOT_SUPPORTED] Either WiFi, Ethernet or Cellular network interface need to be enabled
42-
#endif
43-
4423
#define FS_FAT 1
4524
#define FS_LFS 2
4625

@@ -53,15 +32,16 @@
5332
#elif COMPONENT_SD
5433
#define TEST_BLOCK_DEVICE_TYPE "SD"
5534
#define TEST_USE_FILESYSTEM FS_FAT
56-
#elif COMPONENT_FLASHIAP
57-
#define TEST_BLOCK_DEVICE_TYPE "FLASHIAP"
5835
#elif COMPONENT_SDIO
5936
#define TEST_BLOCK_DEVICE_TYPE "SDIO"
6037
#elif COMPONENT_NUSD
6138
#define TEST_BLOCK_DEVICE_TYPE "NUSD"
6239
#define TEST_USE_FILESYSTEM FS_FAT
40+
#elif COMPONENT_FLASHIAP && MBED_CONF_FLASHIAP_BLOCK_DEVICE_SIZE
41+
#define TEST_BLOCK_DEVICE_TYPE "FLASHIAP"
6342
#else
6443
#define TEST_BLOCK_DEVICE_TYPE "UNKNOWN"
44+
#error [NOT_SUPPORTED] no valid block device enabled for this target
6545
#endif
6646

6747
#if !defined(TEST_USE_FILESYSTEM)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* mbed Microcontroller Library
3+
* Copyright (c) 2006-2019 ARM Limited
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
*/
19+
20+
#define ETHERNET 1
21+
#define WIFI 2
22+
#define MESH 3
23+
#define CELLULAR 4
24+
25+
#if !defined(MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE)
26+
#error [NOT_SUPPORTED] No network interface found on this target.
27+
#endif
28+
29+
#if MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == ETHERNET
30+
#define TEST_NETWORK_TYPE "Ethernet"
31+
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == WIFI
32+
#define TEST_NETWORK_TYPE "WiFi"
33+
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == MESH
34+
#define TEST_NETWORK_TYPE "Mesh"
35+
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
36+
#define TEST_NETWORK_TYPE "Cellular"
37+
#else
38+
#define TEST_NETWORK_TYPE "Unknown"
39+
#error [NOT_SUPPORTED] Either WiFi, Ethernet or Cellular network interface need to be enabled
40+
#endif

TESTS/integration/fs-single/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "utest/utest.h"
3232
#include "unity/unity.h"
3333
#include "greentea-client/test_env.h"
34-
#include "common_defines_test.h"
34+
#include "common_defines_fs_test.h"
3535
#include "file_test.h"
3636

3737
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME

TESTS/integration/fs-threaded/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "utest/utest.h"
3232
#include "unity/unity.h"
3333
#include "greentea-client/test_env.h"
34-
#include "common_defines_test.h"
34+
#include "common_defines_fs_test.h"
3535
#include "file_test.h"
3636

3737
#ifdef MBED_CONF_APP_BASICS_TEST_FILENAME

TESTS/integration/net-single/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "utest/utest.h"
3030
#include "unity/unity.h"
3131
#include "greentea-client/test_env.h"
32-
#include "common_defines_test.h"
32+
#include "common_defines_net_test.h"
3333
#include "download_test.h"
3434
#include <string>
3535

TESTS/integration/net-threaded/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include "utest/utest.h"
3030
#include "unity/unity.h"
3131
#include "greentea-client/test_env.h"
32-
#include "common_defines_test.h"
32+
#include "common_defines_net_test.h"
3333
#include "download_test.h"
3434
#include <string>
3535

TESTS/integration/stress-net-fs/main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
#include "utest/utest.h"
3232
#include "unity/unity.h"
3333
#include "greentea-client/test_env.h"
34-
#include "common_defines_test.h"
34+
#include "common_defines_fs_test.h"
35+
#include "common_defines_net_test.h"
3536
#include "download_test.h"
3637
#include "file_test.h"
3738
#include <string>

0 commit comments

Comments
 (0)