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

examples: zephyr: certificate_provisioning: pytest improvements #671

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

mniestroj
Copy link
Collaborator

  • drop spaces around = to suppress flake8's "unexpected spaces around keyword / parameter equals"
    warning
  • use build directory as CWD, so that certs/keys are stored in per-application directory (instead of
    current directory from which twister is invoked)
  • use twister serial for mcumgr, so --device-port CLI argument (or CI_DEVNAME_PORT environment
    variable) is not required

This suppresses flake8's "unexpected spaces around keyword / parameter
equals" warning.

Signed-off-by: Marcin Niestroj <[email protected]>
Pytest invokes shell scripts, which create and use certificates in current
working directory. This means that those files are created in current
twister invocation directory.

Use Zephyr example build directory, so that each example has its own
certificates. Additionally this allows to keep twister CWD uncluttered.

Signed-off-by: Marcin Niestroj <[email protected]>
Right now it is necessary to either specify
--pytest-args=--device-port=SERIAL over commandline or set
'CI_DEVICENAME_PORT' and 'hil_board' environment variables.

This makes little sense in context of manual testing, since twister serial
port should be used by default for mcumgr communication.

Fallback to twister serial when neither CLI nor environment variables
specify explicit serial port.

Signed-off-by: Marcin Niestroj <[email protected]>
@mniestroj mniestroj requested review from sam-golioth and szczys and removed request for sam-golioth November 13, 2024 21:27
Copy link

Visit the preview URL for this PR (updated for commit 7810c82):

https://golioth-firmware-sdk-doxygen-dev--pr671-zephyr-certifi-ukyropaa.web.app

(expires Wed, 20 Nov 2024 21:28:21 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: a9993e61697a3983f3479e468bcb0b616f9a0578

@mniestroj mniestroj merged commit 5ece8c9 into main Nov 14, 2024
64 of 74 checks passed
@mniestroj mniestroj deleted the zephyr-certificates-pytest-cleanup branch November 14, 2024 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants