Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix many failed integration tests on Bridles main HIL infrastructure #230

Merged
merged 9 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/qa-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ jobs:
# --tag vector_relay \
# --tag kernel \
#
west twister --verbose --jobs 4 \
west twister --verbose --jobs 2 \
--retry-failed 5 --retry-interval 60 \
--outdir twister-out --no-clean --inline-logs \
--enable-size-report --platform-reports \
Expand Down
4 changes: 2 additions & 2 deletions boards/tiac/magpie_f777ni/magpie_f777ni.dts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
pinctrl-names = "default";
pinctrl-0 = <&can1_rx_ph14 /* CAN_RX1 */
&can1_tx_ph13>; /* CAN_TX1 */
bus-speed = <1000000>;
bitrate = <1000000>;
sample-point = <889>;
}; // can1

Expand All @@ -141,7 +141,7 @@
pinctrl-names = "default";
pinctrl-0 = <&can2_rx_pb12 /* CAN_RX2 */
&can2_tx_pb13>; /* CAN_TX2 */
bus-speed = <1000000>;
bitrate = <1000000>;
sample-point = <889>;
}; // can2

Expand Down
37 changes: 19 additions & 18 deletions doc/bridle/known-warnings-inventory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,37 @@
# Coming later from kconfig docset
.*undefined label: 'kconfig:.*'

#
# TODO: is ".. _install_dependencies_windows:"
# inside ".. group-tab::" realy working?
#
# reference target in: bridle/doc/bridle/doc_build.rst:55
# reference target in: bridle/doc/bridle/gs_installing.rst:58
#
.*Duplicate explicit target name: "install_dependencies_windows"\.
# Coming later from devicetree docset
.*undefined label: 'devicetree:.*'

# FIXME: Sphinx emits "toctree glob pattern %r didn't match any documents"
# instead of:
# .*toctree glob pattern 'applications/\*/README' didn't match any documents
.*toctree glob pattern %r didn't match any documents

#
# TODO: is ".. _install_dependencies_linux:"
# inside ".. group-tab::" realy working?
#
# reference target in: bridle/doc/bridle/doc_build.rst:71
# reference target in: bridle/doc/bridle/gs_installing.rst:74
# reference target in: bridle/doc/bridle/doc_build.rst:56
# reference target in: bridle/doc/bridle/gs_installing.rst:59
#
.*Duplicate explicit target name: "install_dependencies_linux"\.

#
# TODO: is ".. _install_dependencies_macos:"
# inside ".. group-tab::" realy working?
#
# reference target in: bridle/doc/bridle/doc_build.rst:113
# reference target in: bridle/doc/bridle/gs_installing.rst:99
# reference target in: bridle/doc/bridle/doc_build.rst:98
# reference target in: bridle/doc/bridle/gs_installing.rst:75
#
.*Duplicate explicit target name: "install_dependencies_macos"\.

# FIXME: Sphinx emits "toctree glob pattern %r didn't match any documents"
# instead of:
# .*toctree glob pattern 'applications/\*/README' didn't match any documents
# .*toctree glob pattern 'tests/\*/README' didn't match any documents
# .*toctree glob pattern '\*\*index' didn't match any documents
.*toctree glob pattern %r didn't match any documents
#
# TODO: is ".. _install_dependencies_windows:"
# inside ".. group-tab::" realy working?
#
# reference target in: bridle/doc/bridle/doc_build.rst:116
# reference target in: bridle/doc/bridle/gs_installing.rst:89
#
.*Duplicate explicit target name: "install_dependencies_windows"\.
2 changes: 0 additions & 2 deletions doc/bridle/known-warnings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
# FIXME: Sphinx emits "toctree glob pattern %r didn't match any documents"
# instead of:
# .*toctree glob pattern 'applications/\*/README' didn't match any documents
# .*toctree glob pattern 'tests/\*/README' didn't match any documents
# .*toctree glob pattern '\*\*index' didn't match any documents
.*toctree glob pattern %r didn't match any documents
7 changes: 6 additions & 1 deletion doc/bridle/releases/release-notes-3.7.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Supported snippets
* USB Console Snippet (usb-console)
* PWM Servomotor Preset Snippet (pwm-servo)
* CAN timing adjustments (can-timing-adj)
* Watchdog timing adjustments (wdt-timing-adj)

Change log
**********
Expand Down Expand Up @@ -193,14 +194,18 @@ Documentation

:brd:`NOT YET, tbd.`

1. Update all output messages in documentation to be in sync with the upcoming
1. Export ``ZEPHYR_BASE`` as environment variable to make the Sphinx extension
``autodoc`` for the ``pytest-twister-harness`` happy.
2. Update all output messages in documentation to be in sync with the upcoming
Bridle version v3.7.0, based on Zephyr v3.7 (samples and tests).

Issue Related Items
*******************

These GitHub issues were addressed since project bootstrapping:

* :github:`231` - [BUG] build Zephyr docset fails
* :github:`229` - [BUG] magpie_f777ni: wdt_basic_api/drivers.watchdog.stm32wwdg FAILED
* :github:`227` - [BUG] Unable to build any application referencing bridle version information
* :github:`222` - [BUG] unsatisfied dependencies by static Kconfig elements
* :github:`217` - [FCR] Convert board ``arduino_zero`` to board extension
Expand Down
4 changes: 4 additions & 0 deletions doc/zephyr/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
conf = eval_config_file(os.path.join(ZEPHYR_BASE, 'doc', 'conf.py'), tags)
locals().update(conf)

# Export ZEPHYR_BASE as environment variable to make autodoc for the
# pytest-twister-harness happy.
os.environ['ZEPHYR_BASE'] = str(ZEPHYR_BASE)

# pylint: disable=undefined-variable

# Project ----------------------------------------------------------------------
Expand Down
48 changes: 10 additions & 38 deletions doc/zephyr/known-warnings-inventory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,16 @@
.*undefined label: 'dt_vendor_zephyr'

#
# TODO: anchor ".. _Using J-Link RT1170:" multiple times used!
#
# reference target in: zephyr/boards/arm/vmu_rt1170/doc/index.rst:222
# reference target in: zephyr/boards/arm/mimxrt1170_evk/doc/index.rst:322
# TODO: New warnings with Doxygen v1.9.8 - unknown reasons.
#
.*duplicate label using j-link rt1170.*
.*Error in declarator or parameters.*
.*Invalid C declaration: Expected identifier in nested name.*

#
# TODO: is ".. tab:: _`Using Segger J-Link`" realy working?
#
# reference target in: zephyr/doc/develop/flash_debug/probes.rst:251
# referred to there in: zephyr/samples/bluetooth/hci_uart/README.rst:127
# referred to there in: zephyr/samples/bluetooth/hci_uart/README.rst:311
#
.*undefined label: 'using segger j-link'
.*Duplicate explicit target name: "using segger j-link"\.
Expand All @@ -26,72 +24,46 @@
# TODO: is ".. _install_dependencies_ubuntu:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:77
# reference target in: zephyr/doc/develop/getting_started/index.rst:73
#
.*Duplicate explicit target name: "install_dependencies_ubuntu"\.

#
# TODO: is ".. _install_dependencies_macos:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:113
# reference target in: zephyr/doc/develop/getting_started/index.rst:111
#
.*Duplicate explicit target name: "install_dependencies_macos"\.

#
# TODO: is ".. _install_dependencies_windows:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:149
# reference target in: zephyr/doc/develop/getting_started/index.rst:168
#
.*Duplicate explicit target name: "install_dependencies_windows"\.

#
# TODO: is ".. _ubuntu_zephyr_sdk:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:497
# reference target in: zephyr/doc/develop/toolchains/zephyr_sdk.rst:88
#
.*Duplicate explicit target name: "ubuntu_zephyr_sdk"\.

#
# TODO: is ".. _macos_zephyr_sdk:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:554
# reference target in: zephyr/doc/develop/toolchains/zephyr_sdk.rst:144
#
.*Duplicate explicit target name: "macos_zephyr_sdk"\.

#
# TODO: is ".. _windows_zephyr_sdk:"
# inside ".. group-tab::" realy working?
#
# reference target in: zephyr/doc/develop/getting_started/index.rst:603
# reference target in: zephyr/doc/develop/toolchains/zephyr_sdk.rst:192
#
.*Duplicate explicit target name: "windows_zephyr_sdk"\.

#
# TODO: Most 3rd-party API documentations are not sufficiently well-written
# for processing with Doxygen (by zephyr.doxyrunner Sphinx extension)
# without issuing warnings that would lead to errors.
#
.*following parameters of BT_AUDIO_CODEC_CFG_LC3_DATA.* not documented.*
.*following parameters of BT_AUDIO_CODEC_CAP_LC3.* not documented.*
.*following parameters of BT_AUDIO_CODEC_LC3_CONFIG.* not documented.*
.*following parameter of BT_AUDIO_CODEC_LC3_CONFIG.* not documented.*
.*following parameter of BT_BAP_LC3_BROADCAST_PRESET.* not documented.*
.*following parameter of BT_BAP_LC3_UNICAST_PRESET.* not documented.*
.*following parameter of BT_GATT_CHARACTERISTIC.* not documented.*
.*argument '.*' of command @param is not found in the argument list of.*
.*found </em> tag without matching <em>.*

#
# TODO: New warnings with Doxygen v1.9.8 - unknown reasons.
#
.*Error in declarator or parameters.*
.*Invalid C declaration: Expected identifier in nested name.*

#
# TODO: New warnings with West v1.3 - unknown reasons.
#
.*Inline strong start-string without end-string.*
13 changes: 0 additions & 13 deletions doc/zephyr/known-warnings.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
# Each line should contain the regular expression of a known Sphinx warning
# that should be filtered out additional to the original filter set

#
# TODO: anchor ".. _Using J-Link RT1170:" multiple times used!
#
# reference target in: zephyr/boards/arm/vmu_rt1170/doc/index.rst:222
# reference target in: zephyr/boards/arm/mimxrt1170_evk/doc/index.rst:322
#
.*duplicate label using j-link rt1170.*

#
# TODO: New warnings with Doxygen v1.9.8 - unknown reasons.
#
.*Error in declarator or parameters.*
.*Invalid C declaration: Expected identifier in nested name.*

#
# TODO: New warnings with West v1.3 - unknown reasons.
#
.*Inline strong start-string without end-string.*
51 changes: 51 additions & 0 deletions snippets/wdt-timing-adj/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. _snippet-wdt-timing-adj:

Watchdog timing adjustments (wdt-timing-adj)
############################################

Overview
********

With this snippet, the user can create Zephyr standard watchdog drivers and API
test suites and also run them successfully. Since boards are very often designed
for high performance and thus a high CPU clock, lower watchdog speeds or higher
timeout values can no longer be set by the Zephyr API without acceptable errors.
This is also not an issue for normal operation. The test suites, however, want
to prove that this is also possible in principle. However, this requires an
individual board-specific reduction of the CPU clock.

How to add support of a new board
*********************************

* add board dts overlay to this snippet which overwrites CPU clock setup nodes;
* add correct CPU clock setup ready for the Zephyr standard watchdog test suites

Programming
***********

Correct snippet designation must be entered when you invoke ``west build``.
For example:

.. code-block:: console

west build -b magpie_f777ni \
-d build/magpie_f777ni \
-p always \
-S wdt-timing-adj \
zephyr/tests/drivers/watchdog/wdt_basic_api \
-- -DDTC_OVERLAY_FILE="boards/stm32_wwdg.overlay"
west flash -d build/magpie_f777ni

Testing
*******

Correct snippet designation must be entered when you invoke ``west twister``,
either directly on the command line or as an alternative test specification.
For example:

.. code-block:: console

west twister --device-testing \
--hardware-map map_magpie_f777ni.yaml \
--alt-config-root bridle/zephyr/alt-config/drivers/watchdog/wdt_basic_api \
--testsuite-root zephyr/tests/drivers/watchdog/wdt_basic_api
28 changes: 28 additions & 0 deletions snippets/wdt-timing-adj/boards/magpie_f777ni.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2024 TiaC Systems
* SPDX-License-Identifier: Apache-2.0
*/

&clk_hse {
hse-bypass;
clock-frequency = <DT_FREQ_M(25)>; /* 25MHz crystal */
};

&pll {
/* Reduce PLL speed to achieve test window timings */
clocks = <&clk_hse>;
div-m = <15>;
mul-n = <144>;
div-p = <2>;
div-q = <5>;
};

&rcc {
clocks = <&pll>;
clock-frequency = <DT_FREQ_M(120)>;
ahb-prescaler = <1>;
/* Reduce APB1 speed to achieve test window timings */
apb1-prescaler = <16>;
/* Reduce APB2 speed to achieve test window timings */
apb2-prescaler = <2>;
};
6 changes: 6 additions & 0 deletions snippets/wdt-timing-adj/snippet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: wdt-timing-adj

boards:
magpie_f777ni/stm32f777xx:
append:
EXTRA_DTC_OVERLAY_FILE: boards/magpie_f777ni.overlay
11 changes: 0 additions & 11 deletions zephyr/alt-config/drivers/can/shell/testcase.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ tests:
- s32z2xxdc2/s32z270/rtu1
- s32z2xxdc2@D/s32z270/rtu0
- s32z2xxdc2@D/s32z270/rtu1
drivers.watchdog.stm32wwdg:
drivers.watchdog.stm32wwdg.timing.adj:
filter: dt_compat_enabled("st,stm32-window-watchdog") or dt_compat_enabled("st,stm32-watchdog")
extra_args: DTC_OVERLAY_FILE="boards/stm32_wwdg.overlay"
required_snippets:
- wdt-timing-adj
platform_allow:
- magpie_f777ni
drivers.watchdog.stm32wwdg:
filter: dt_compat_enabled("st,stm32-window-watchdog") or dt_compat_enabled("st,stm32-watchdog")
extra_args: DTC_OVERLAY_FILE="boards/stm32_wwdg.overlay"
platform_allow:
- nucleo_f091rc
- nucleo_f103rb
- nucleo_f207zg
Expand Down
Loading