Skip to content

Commit e72b38a

Browse files
author
Jamie Smith
authored
Reactivate EMAC Greentea test (#378)
* Migrate emac test code into a library * Build passes now! * Fix STLINK bug, update README * Reduce verbosity a bit * Formatting * Fix licenses
1 parent 197e043 commit e72b38a

38 files changed

+474
-964
lines changed

.github/workflows/basic_checks.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout repo
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0
2323

@@ -68,7 +68,7 @@ jobs:
6868

6969
steps:
7070
- name: Checkout repo
71-
uses: actions/checkout@v3
71+
uses: actions/checkout@v4
7272
with:
7373
fetch-depth: 0
7474

@@ -90,7 +90,7 @@ jobs:
9090
steps:
9191

9292
- name: Checkout repo
93-
uses: actions/checkout@v3
93+
uses: actions/checkout@v4
9494
with:
9595
fetch-depth: 0
9696

@@ -143,7 +143,7 @@ jobs:
143143
steps:
144144

145145
- name: Checkout repo
146-
uses: actions/checkout@v3
146+
uses: actions/checkout@v4
147147
with:
148148
fetch-depth: 0
149149
submodules: recursive
@@ -216,7 +216,7 @@ jobs:
216216
steps:
217217
-
218218
name: Checkout repo
219-
uses: actions/checkout@v3
219+
uses: actions/checkout@v4
220220
with:
221221
fetch-depth: 0
222222

@@ -244,7 +244,7 @@ jobs:
244244
steps:
245245
-
246246
name: Checkout repo
247-
uses: actions/checkout@v3
247+
uses: actions/checkout@v4
248248

249249
- name: Install python3-venv
250250
run: |

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
with:
1616
submodules: recursive
1717

.github/workflows/greentea_cmake.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134

135135
steps:
136136
- name: Checkout
137-
uses: actions/checkout@v3
137+
uses: actions/checkout@v4
138138

139139
- name: Install python3-venv
140140
run: |

.github/workflows/test_building_multiple_executables.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
container: ghcr.io/armmbed/mbed-os-env:master-latest
99
steps:
1010
- name: Checkout
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
1212

1313
- name: Install Python packages
1414
# Note: pip>=20.3 is needed to install dependencies of cysecuretools

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Arm Mbed OS is an open source embedded operating system designed specifically fo
1313
Mbed OS provides a platform that includes:
1414

1515
- Security foundations.
16-
- Cloud management services.
17-
- Drivers for sensors, I/O devices and connectivity.
16+
- Embedded networking libraries, e.g Wi-Fi and Ethernet drivers and network libraries using them
17+
- Drivers for microcontroller hardware features, including digital and analog I/O, PWM, and communications busses
18+
- Storage features, including file system and block device abstractions and low-level drivers
1819

1920
This is Mbed OS Community Edition (CE), a fork focused on improving the build system and tooling, fixing bugs, and keeping maintenance going after ARM's step back from the Mbed project.
2021

connectivity/libraries/nanostack-libservice/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ target_sources(mbed-nanostack-libservice
2222
source/nvmHelper/ns_nvm_helper.c
2323
)
2424

25+
target_link_libraries(mbed-nanostack-libservice PUBLIC mbed-nanostack-hal_mbed_cmsis_rtos)
26+
2527
# The definition, source files and include directories below
2628
# are needed by mbed-trace which is part of the mbed-core CMake target
2729
target_compile_definitions(mbed-core-flags

connectivity/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_interrupt_private.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
#ifndef ARM_HAL_INTERRUPT_PRIVATE_H_
1919
#define ARM_HAL_INTERRUPT_PRIVATE_H_
2020

21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
2125
void platform_critical_init(void);
2226

27+
#ifdef __cplusplus
28+
}
29+
#endif
30+
2331
#endif

connectivity/netsocket/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4+
add_subdirectory(tests/emac_test_utils)
5+
46
if(MBED_ENABLE_OS_INTERNAL_TESTS)
57
if(MBED_BUILD_GREENTEA_TESTS)
68
add_subdirectory(tests/TESTS)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
add_subdirectory(emac)
12
add_subdirectory(interface)
23
add_subdirectory(wifi)
Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,15 @@
11
# Copyright (c) 2020 ARM Limited. All rights reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
cmake_minimum_required(VERSION 3.19.0 FATAL_ERROR)
5-
6-
set(MBED_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../.. CACHE INTERNAL "")
7-
set(TEST_TARGET mbed-connectivity-netsocket-network-emac)
8-
9-
include(${MBED_PATH}/tools/cmake/mbed_greentea.cmake)
10-
11-
project(${TEST_TARGET})
4+
if(NOT "MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=WIFI" IN_LIST MBED_CONFIG_DEFINITIONS AND
5+
NOT "MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE=ETHERNET" IN_LIST MBED_CONFIG_DEFINITIONS)
6+
set(TEST_SKIPPED "Requires wi-fi or ethernet to be the default network interface")
7+
endif()
128

139
list(
1410
APPEND
1511
TEST_SOURCE_LIST
1612
main.cpp
17-
emac_TestMemoryManager.cpp
18-
emac_TestNetworkStack.cpp
19-
emac_ctp.cpp
20-
emac_membuf.cpp
2113
emac_test_broadcast.cpp
2214
emac_test_initialize.cpp
2315
emac_test_memory.cpp
@@ -26,14 +18,16 @@ list(
2618
emac_test_unicast_burst.cpp
2719
emac_test_unicast_frame_len.cpp
2820
emac_test_unicast_long.cpp
29-
emac_util.cpp
3021
)
3122

3223
mbed_greentea_add_test(
3324
TEST_NAME
34-
${TEST_TARGET}
25+
mbed-connectivity-network-emac
3526
TEST_SOURCES
3627
${TEST_SOURCE_LIST}
3728
TEST_REQUIRED_LIBS
38-
mbed-emac
29+
mbed-netsocket
30+
mbed-emac-test-utils
31+
TEST_SKIPPED
32+
${TEST_SKIPPED}
3933
)

0 commit comments

Comments
 (0)