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

scripts: tests: Blackbox test expansion - platform #68765

Conversation

LukaszMrugala
Copy link
Collaborator

Adds tests related to the Twister's platform selection:

  • --board-root, -A,
  • --force-platform, -K
  • --platform, -p

Moves other platform tests to the same file:

  • --emulation-only
  • --exclude-platform, -P
  • --all, -l

@LukaszMrugala LukaszMrugala force-pushed the lmrugalx_twister_blackbox_expansion_platform branch 3 times, most recently from 573f192 to 822d945 Compare February 8, 2024 16:33
@LukaszMrugala LukaszMrugala marked this pull request as ready for review February 9, 2024 08:36
@zephyrbot zephyrbot added the area: Twister Twister label Feb 9, 2024
KamilxPaszkiet
KamilxPaszkiet previously approved these changes Feb 26, 2024
@LukaszMrugala LukaszMrugala force-pushed the lmrugalx_twister_blackbox_expansion_platform branch 2 times, most recently from 473bc86 to 60da1b4 Compare March 8, 2024 15:40
nashif
nashif previously approved these changes Mar 11, 2024
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd suggest file paths aligned to what is currently with HWMv2 and use dummy names consistently
test_data/boards/dummy_vendor/dummy_board/board.yml

Comment on lines 1 to 4
board:
name: dummy
vendor: others
socs: []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
board:
name: dummy
vendor: others
socs: []
board:
name: dummy_board
vendor: dummy_vendor
socs:
- name: dummy_soc

with HWMv2 the board's full name will be: dummy_board/dummy_soc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot use dummy_vendor; Zephyr has a vendor whitelist.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why would we want to fill out the socs list? It is not necessary for the test and requires adding new files, to avoid the ERROR: SoC 'dummy_soc' is not found, please ensure that the SoC exists and that soc-root containing 'dummy_soc' has been correctly defined.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those new files would also need to be outside the TEST_DATA folder, as soc-roots are hard-coded inside Twister and cannot be changed via a flag.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder should this twister blackbox test use subsys/testsuite folder then the same way as unit_testing does (see also #69786)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I have found unit_testing SoCs in $ZEPHYR_BASE/scripts/pylib/twister/soc. That path is one of the two hardcoded paths and I'll be able to put the dummy_soc definitions there.
However, the PR you've linked changes the hard-coded path from $ZEPHYR_BASE/scripts/pylib/twister/soc to $ZEPHYR_BASE/subsys/testsuite (still hardcoded, however). This means that these two PRs would be conflicting.

Do we want to use the current path ($ZEPHYR_BASE/scripts/pylib/twister/soc) and notify the other PR in case this one is merged first or use the proposed new path ($ZEPHYR_BASE/subsys/testsuite/soc) and wait for them to be merged first?

Or maybe even add another path to the hard-coded ones ($TEST_DATA/soc or something similar) so we can stay within TEST_DATA with our board and SoC definitions.

Copy link
Collaborator Author

@LukaszMrugala LukaszMrugala Mar 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it would be best to afford soc_root and arch_root the same treatment as board_roots; that is: option of adding more via Twister flags. But that's outside of scope of this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file needed for this blackbox test ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by documentation, but can be removed without the test failing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this file either should affect testing or not included.

@@ -0,0 +1,4 @@
name: dummy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: dummy
name: dummy_board

name: dummy
vendor: dummy_vendor
arch: dummy_arch
identifier: dummy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
identifier: dummy
identifier: dummy_board/dummy_soc

* SPDX-License-Identifier: Apache-2.0
*/

#include "dummy.dts"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include "dummy.dts"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file needed for this blackbox test ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required by documentation, but can be removed without the test failing.

KamilxPaszkiet
KamilxPaszkiet previously approved these changes Mar 26, 2024
mdubielx
mdubielx previously approved these changes Mar 26, 2024
@LukaszMrugala LukaszMrugala dismissed stale reviews from mdubielx, KamilxPaszkiet, and nashif via 1842c37 March 28, 2024 18:12
@LukaszMrugala LukaszMrugala force-pushed the lmrugalx_twister_blackbox_expansion_platform branch 3 times, most recently from 7a2bb4a to 2b32d2e Compare March 29, 2024 10:00
@zephyrbot zephyrbot added the area: Testsuite Testsuite label Mar 29, 2024
Adds tests related to the Twister's platform selection:
* -A, --board-root
* -K, --force-platform
* -p, --platform

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
Blackbox tests related to platform choice
now moved to test_platform.py:
* test_emulation_only
* test_exclude_platform

Signed-off-by: Lukasz Mrugala <lukaszx.mrugala@intel.com>
@LukaszMrugala LukaszMrugala force-pushed the lmrugalx_twister_blackbox_expansion_platform branch from 2b32d2e to 69ddd62 Compare March 29, 2024 12:05
@KamilxPaszkiet KamilxPaszkiet requested review from mdubielx, nashif and golowanow and removed request for mdubielx March 29, 2024 15:01
@nashif nashif merged commit 2302e5f into zephyrproject-rtos:main Mar 31, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants