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

tests: capture screenshot on failure #284

Merged
merged 5 commits into from
Aug 19, 2024
Merged

tests: capture screenshot on failure #284

merged 5 commits into from
Aug 19, 2024

Conversation

zeha
Copy link
Member

@zeha zeha commented Aug 17, 2024

@mika wrote most of this, I just rebased it on top of #283

  • Capture VM screenshot when tests fail.
  • Add instructions for running the tests locally.
  • Ensure curl is installed.
  • Update default hostname in helper script.

Debugging aid for #278.

Provide tests/README.md for usage instructions, when trying to reproduce
the GitHub tests inside a local VM.
Our tests/build-vm-and-test.sh script relies on presence of curl
command, so ensure it's available.
We need to replace `/usr/bin/env python` with `/usr/bin/env python3`
as /usr/bin/python is provided only by the python-is-python3 or
python-is-python2 packages through a symlink (meant for third-party or
legacy scripts, see https://wiki.debian.org/Python), though those might
not be present e.g. when running in a local Debian bookworm VM.
@zeha
Copy link
Member Author

zeha commented Aug 17, 2024

Example result:

screenshot

… fails

While debugging the failing GitHub Actions (see #278), we noticed that
it might serve useful to have a screenshot of the booted system
available. We can capture such a screenshot via vncsnapshot.

NOTE: we move the files inside `results` only if the directory as such
exists in $PWD, otherwise we'd fail the build when being executed as
`tests/build-vm-and-test.sh test` from inside the grml-debootstrap.git.
This happens when manually reproducing the GH tests, though then
`build-vm-and-test.sh` is supposed to be executed from the parent
directory of the `tests` directory (being the grml-debootstrap.git
checkout).
Copy link
Member

@mika mika left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@zeha zeha merged commit e43e6cc into master Aug 19, 2024
58 of 78 checks passed
@zeha zeha deleted the mika/ci branch August 19, 2024 14:41
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.

2 participants