Skip to content

Commit 5887f9e

Browse files
author
Jamie Smith
authored
Loads of general and MIMXRT-specific test fixes (#412)
* Update MIMXRT105x linker script to use memory banks * Disable SRAM for now :/ * Add split heap support * Loads of general and MIMXRT-specific test fixes * Style fix * Remove include guard from mbed_config.tmpl so that it can be re-included by the build system * Oops left that line there
1 parent d255e11 commit 5887f9e

File tree

20 files changed

+57
-77
lines changed

20 files changed

+57
-77
lines changed

TESTS/configs/greentea_full.json5

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"platform.all-stats-enabled": 1,
55

66
// Enable auto reboot on error, required for crash reporting test
7-
"platform.fatal-error-auto-reboot-enabled": true
7+
"platform.fatal-error-auto-reboot-enabled": true,
8+
9+
// Allow lots of reboots so that we don't get in a situation where the MCU refuses to boot
10+
// after crashing and being reflashed (since some MCUs/flash tools don't reset the
11+
// crash data RAM)
12+
"platform.error-reboot-max": 99999
813
}
914
}

connectivity/netsocket/tests/TESTS/netsocket/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Configure the firewall to allow this traffic to access the test server.
6060

6161
These services are available on many operating systems, and installing them is out of scope of this document. Below is an example of how to install these services into a Debian/Ubuntu based Linux distribution using standard Inet Daemon:
6262

63-
```.sh
63+
```shell
6464
$ sudo apt install inetutils-inetd
65-
$ nano /etc/inetd.conf
65+
$ sudo nano /etc/inetd.conf
6666
```
6767

6868
Enable following services from /etc/inetd.conf:
@@ -79,6 +79,13 @@ daytime stream tcp6 nowait root internal
7979
time stream tcp6 nowait root internal
8080
```
8181

82+
Then run:
83+
84+
```shell
85+
$ sudo systemctl enable inetutils-inetd.service
86+
$ sudo systemctl start inetutils-inetd.service
87+
```
88+
8289
Below is an example of how to install these services in TLS version into a Debian/Ubuntu based Linux distribution using Stunnel4 Daemon:
8390

8491
```.sh

drivers/tests/TESTS/mbed_drivers/reset_reason/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ if(NOT "DEVICE_RESET_REASON=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "Reset Reason is not supported for this target")
66
endif()
77

8-
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
9-
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
10-
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
11-
endif()
12-
138
mbed_greentea_add_test(
149
TEST_NAME
1510
mbed-drivers-reset-reason

drivers/tests/TESTS/mbed_drivers/watchdog_reset/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ if(NOT "DEVICE_WATCHDOG=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "Watchdog is not supported for this target")
66
endif()
77

8-
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
9-
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
10-
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
11-
endif()
12-
138
mbed_greentea_add_test(
149
TEST_NAME
1510
mbed-drivers-watchdog-reset

drivers/usb/tests/TESTS/host_tests/usb_device_hid.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import uuid
2323
import sys
2424
import mbed_host_tests
25+
import hid
2526
import usb.core
2627
from usb.util import (
2728
CTRL_IN,
@@ -42,13 +43,6 @@
4243
# Use a default backend on other platforms.
4344
USB_BACKEND = None
4445

45-
try:
46-
import hid
47-
except ImportError:
48-
CYTHON_HIDAPI_PRESENT = False
49-
else:
50-
CYTHON_HIDAPI_PRESENT = True
51-
5246
# USB device -- device classes
5347
USB_CLASS_HID = 0x03
5448

@@ -112,8 +106,6 @@ def build_get_desc_value(desc_type, desc_index):
112106

113107
def usb_hid_path(serial_number):
114108
"""Get a USB HID device system path based on the serial number."""
115-
if not CYTHON_HIDAPI_PRESENT:
116-
return None
117109
for device_info in hid.enumerate(): # pylint: disable=no-member
118110
if device_info.get('serial_number') == serial_number: # pylint: disable=not-callable
119111
return device_info['path']
@@ -563,9 +555,6 @@ def start_bg_task(self, **thread_kwargs):
563555

564556
def cb_test_raw_io(self, key, value, timestamp):
565557
"""Receive HID reports and send them back to the device."""
566-
if not CYTHON_HIDAPI_PRESENT:
567-
self.send_kv(MSG_KEY_HOST_READY, MSG_VALUE_NOT_SUPPORTED)
568-
return
569558
try:
570559
# The size of input and output reports used in test.
571560
report_size = int(value)

features/frameworks/utest/source/utest_harness.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ bool Harness::run(const Specification& specification)
165165
void Harness::raise_failure(const failure_reason_t reason)
166166
{
167167
UTEST_LOG_FUNCTION();
168-
// ignore a failure, if the Harness has not been initialized.
169-
// this allows using unity assertion macros without setting up utest.
170-
if (test_cases == NULL) return;
168+
169+
// If not currently in a test case and code does a unity assertion that fails, it will end up
170+
// at this assert. This will stop execution of the program.
171+
// This allows using unity assertion macros without setting up utest.
172+
assert(test_cases != nullptr);
171173

172174
utest::v1::status_t fail_status = STATUS_ABORT;
173175
if (handlers->test_failure) handlers->test_failure(failure_t(reason, location));

hal/tests/TESTS/mbed_hal/reset_reason/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ if(NOT "DEVICE_RESET_REASON=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "Reset Reason is not supported for this target")
66
endif()
77

8-
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
9-
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
10-
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
11-
endif()
12-
138
mbed_greentea_add_test(
149
TEST_NAME
1510
mbed-hal-reset-reason

hal/tests/TESTS/mbed_hal/rtc_reset/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ if(NOT "DEVICE_RTC=1" IN_LIST MBED_TARGET_DEFINITIONS)
55
set(TEST_SKIPPED "RTC is not supported for this target")
66
endif()
77

8-
if("TARGET_MIMXRT105X" IN_LIST MBED_TARGET_DEFINITIONS)
9-
# This test causes this target to die. See https://github.com/mbed-ce/mbed-os/issues/83
10-
set(TEST_SKIPPED "Temporarily disabled for this target, see #83")
11-
endif()
12-
138
mbed_greentea_add_test(
149
TEST_NAME
1510
mbed-hal-rtc-reset

platform/tests/TESTS/mbed_platform/crash_reporting/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
if(NOT "MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED=1" IN_LIST MBED_CONFIG_DEFINITIONS)
5-
set(TEST_SKIPPED "CRC is not supported for this target")
5+
set(TEST_SKIPPED "MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED is not enabled for this target")
66
endif()
77

88
mbed_greentea_add_test(

platform/tests/TESTS/mbed_platform/crash_reporting/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ static mbed_error_ctx saved_error_ctx = {0};
3535

3636
void mbed_error_reboot_callback(mbed_error_ctx *error_context)
3737
{
38-
39-
TEST_ASSERT_EQUAL_PTR(error_context, &MBED_CRASH_DATA);
4038
memcpy(&saved_error_ctx, error_context, sizeof(mbed_error_ctx));
4139
mbed_reset_reboot_error_info();
4240

0 commit comments

Comments
 (0)