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
Add smoke test suite #62
Conversation
|
After changing the parts I commented on, I can confirm the tests run fine in case included in Gentoo package tests, too. Great work 👍 . |
58e614d
to
6648411
Compare
|
Another review would be good, I've made significant improvements to the pull request, including making it check for errors on stderr for each of the tests and making the tests run in parallel (with GNU make output grouping). |
|
@pabs3 That looks great! I currently get empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, apart from the version strangeness with socat and the missing \ in one place and a small typo I did not find any issues 👍 .
Since I'm also only a contributor, of course it's up to @hoyon to perform a real review and merge. I think some small extension (in a later commit) could be to also run make test (after installing all dependencies) in the GitHub action workflow so the tests run after every commit / PR.
5e8f72f
to
0b99f23
Compare
|
Fixed a few more issues. I think it is ready for a final review before merging. At this time I don't know enough about GitHub actions to integrate the tests with that, but that can happen at a later stage. |
|
Thanks so much for this @pabs3!!! I haven't been able to review this properly yet but I've checked out the branch and run Am I missing something? I'm using arch linux and
I'd definitely want that. IMO there's not much value in a test suite if it's not being run automatically on every commit. |
It seems the flag is listed on the manpage provided for version 21.1.3-2 in Arch here: https://man.archlinux.org/man/xvfb-run.1.en |
Just a quick reply: On Gentoo, the new code runs like a charm without any changes even in the testing sandbox used by Portage (Gentoo's package manager) 👍 . |
It seems like the arch linux xvfb-run script has a number of issues. I've managed to manually patch the script to get the tests to pass but will need to find some time to investigate deeper then report upstream. |
Here's a trivial commit adding this, that was easier than expected: Feel free to pull it, add it here, or I can also open a PR after this one is merged 😉. |
|
@hoyon if I switch from I added a few more fixes:
|
b21e607
to
8270b2b
Compare
|
One more fix: avoid ././ in the Xauthority path.
…--
bye,
pabs
https://bonedaddy.net/pabs3/
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay!
Some minor comments but thanks again for this!
test/env
Outdated
| TEMP="$MPV_MPRIS_TEST_TMP" \ | ||
| TMP="$MPV_MPRIS_TEST_TMP" \ | ||
| dbus-run-session -- \ | ||
| xvfb-run --auto-servernum --auth-file "$MPV_MPRIS_TEST_XAUTH/$(basename "$1").Xauthority" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replacing this with -f does indeed work in arch linux. I've reported the bug upstream.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, added a comment about it.
What is the bug link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added to the patch. Looks like it is fixed now so maybe I can switch back to the long option though?
2678374
to
d805516
Compare
|
Updated to add an xvfb log too. |
Uses mpv, mpv-mpris, playerctl, sound-theme-freedesktop, bash, dbus-run-session, xvfb, xauth, jo, jq, socat and awk. Initial tests include checking metadata, pausing a playing mpv, playing a paused mpv, toggling mpv between playing and pausing, stopping a playing mpv. Add enough parameters to make it flexible and useful for testing already installed mpv mpris plugins, which will primarily be useful for distros. Document the test requirements and parameters in the README.md file. Should help prevent breakage and ensure mpv compatibility.
Ensures that the build process does not modify any files, that the .gitignore file covers all files and that the clean process removes all files not in git.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests all pass when running in parallel now!
Thanks again for this work. I'll merge it in now!
|
Thanks for merging.
Any particular reason you do squashes instead of merges or rebases?
Can we get a new release for the cleanups and test suite?
…--
bye,
pabs
https://bonedaddy.net/pabs3/
|
Uses mpv, mpv-mpris, playerctl, sound-theme-freedesktop, bash,
dbus-run-session, xvfb, xauth, jo, jq, socat and awk.
Initial tests include checking metadata, pausing a playing mpv, playing a
paused mpv, toggling mpv between playing and pausing, stopping a playing mpv.
Add enough parameters to make it flexible and useful for testing already
installed mpv mpris plugins, which will primarily be useful for distros.
Document the test requirements and parameters in the README.md file.
Should help prevent breakage and ensure mpv compatibility.
This has been adapted from the Debian autopkgtests that I wrote:
https://sources.debian.org/src/mpv-mpris/unstable/debian/tests/