This simplifies the code and makes it clearer that both properties are
defined in terms of the Binding object matched to a given DT node.
Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
`_current` is now functionally equals to `arch_curr_thread()`, remove
its usage in-tree and deprecate it instead of removing it outright,
as it has been with us since forever.
Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
The python subprocess call had a stdout=subprocess.PIPE parameter that
redirects standard output to a pipe, and a stderr=subprocess.STDOUT
parameter that redirected stderr to the pipe. This mixed JSON and
non-JSON output together, and issued an exception. Fixing with
stderr=subprocess.DEVNULL to ignore standard error and only keep the
JSON output.
Signed-off-by: Josuah Demangeon <me@josuah.net>
These ignores were added with an older version of pylint and are
either removed or ignored by default.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Fix Ztest test function name extraction from ELF symbols
for C++ compiled binaries where symbol names need additional
'demangling' to match with corresponding test names.
The `c++filt` utility (part of binutils) is called for
demangling when it is needed.
Twister test suite extension and adjustment.
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Fix a problem of Ztest suite names not taken into account by Twister
to identify a TestCase, so in some situations a Ztest test's status
was not assigned to the proper TestCase and it remains 'None'
whereas the actual status value lost, eventually the resulting total
execution counters not correct.
The issue was observed in these situations:
* Ztest application with multiple test suites having same test names.
* Ztest suite is 'skipped' entirely on execution with all its tests.
The proposed solution extends Twister test case name for Ztest to
include Ztest suite name, so the resulting identifier looks like:
`<test_scenario_name>.<ztest_suite_name>.<ztest_name>`
The above naming scheme now requires ztest_suite_name part to be
provided for `--sub-test` command line option.
Testcase identifiers in twister.json and testplan.json will also
include ztest_suite_name component.
The Twister Ztest(Test) Harness is improved to track all state changes
known from the test application's log for Ztest suites and test cases,
so now it parses log output from a Ztest application more scurpulously.
Regular expressions to match log records are extended and optimized
to compile them only once and, in some cases, fixed (suite summary).
Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
Extended hardware map to share a single board between variants.
To run tests for different variants on the same board
without re-configuring the hardware map file for each variant,
one can use a `platform` atribute as a list of names.
Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
Previously, rtt start would always fail because the target
(i.e. firmware) had not been started.
```
Info : rtt: Searching for control block 'SEGGER RTT'
Info : rtt: No control block found
```
When the command is 'rtt', run the binary via gdb before calling
'rtt start'. Firmware calls `SEGGER_RTT_Init()` shortly after
init which allows OpenOCD to find the RTT control block.
Similarly, only start the 'rtt server' after calling
'rtt start' to avoid any potential race conditions
internally within OpenOCD.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Previously, there was a warning that the to_num() method can
(and probably should) be unbound from OpenOcdBinaryRunner.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Similar to how print_gdbserver_message() prints GDB server info
when "west debug" is run, print RTT server info when "west rtt"
is run.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
Add support for the rtt target so that users can run
`west build -p auto -b <board> -t rtt <app>`
similarly to the way that users can now do so with the debug
target, since the rtt target is supposed to be used in a similar
way.
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
This is generating lots of duplication and unnecessary builds when
multiple arches are being changed. Let's stick to basic coverage which
should be enough for PRs.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add a compliance test using ruff, for both linting and formatting of
newly added python files.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add simple scripts to convert ruff check and ruff format output to
toml exclude sections.
These sections can be used to ignore baseline violations for an existing
codebase.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Reporting or annotating issues can be done on a range rather than a
single line.
Add support for end line and end column.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>