native_posix is now deprecated.
Building these tests in both native_sim and native_posix does not
improve coverage for the tests or subsystem but doubles CI time.
As anyhow native_posix will be removed all together in
2 releases, let's remove it already for these.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
During the hwmv1->v2 transition, overlays from a base
board were made to be shared with the variants.
So at that time all overlays for variants which were
just copies of the base overlay were removed.
After that in
https://github.com/zephyrproject-rtos/zephyr/pull/71149
this shared/merged overlay behaviour was reverted,
but not all tests were fixed.
This is one of those. Let's fix it.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
For the 64 bit targets, change identifiers to the new hwmv2 ones
And remove redundant overlays (which were equal for the 32
and 64 bit versions)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Fix this test for the native_simulator,
and add it as a default test target.
Also be a bit clearer in stdout about the test having
passed or not.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The current error messages are a bit cryptic, rework them to make them
more meaningful:
- add an extra message on the first error to explain what the errors
refer to.
- rework the error message to be more explicit.
- rework the priority string print to use a LEVEL+offset format to
somehow highlight that the number is the offset from the level, not
the actual priority.
- print the init function name in addition to the devicetree path.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Since bb590b5b6e introduced ordinals in the priority sequence, the "same
priority" case cannot happen anymore, furthermore the priority value in
the script is now the position of the function in the init sequence, so
if two devices have the same priority there's something real bad going
on.
Drop all the "same priority" handling code and tests, convert the case
into ane exception instead. Drop the init stubs as well from the test,
they are not required anymore.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Rework check_init_priorities to use the main executable file instead of
the individual object files for discovering the devices.
This should make the script more robust in case of stale files in the
build directory, and also makes it work with LTO object files.
Additionally, keep track of the detected init calls, and add a handy
"-i" option to produce a human readable print of the initcalls in the
call sequence, which can be useful for debugging initialization problems
due to odd SYS_INIT and DEVICE interactions.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Add `CONFIG_DEVICE_DEPS` to force two stage linking, otherwise the
following check means the test never runs:
```
if (TARGET zephyr_pre1)
add_dependencies(zephyr_pre1 check_init_priorities_output)
endif()
```
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
zephyr_pre1 target may not always exists, e.g. if second linking pass is
not needed.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a test specifically for the check_init_priorities scripts.
The test creates a set of fake devices to exercise the three possible
conditions, run a build, run the check script and validate the script
output.
The check is meant to fail the build on error but that's bypassed in
this case as that would fail the twister run. That specific bit is
covered in unit tests anyway.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>