-
Notifications
You must be signed in to change notification settings - Fork 208
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
Skip sshfs-related unit tests if sshfs is not installed #1538
Comments
I'm not convinced. Skipping is IMHO never a good solution. I checked https://github.com/bit-team/backintime/blob/dev/CONTRIBUTING.md#build--install This could be modified because there is no section for "test dependencies". Not sure if "build dependencies" count for that? Currently "sshfs" is just a recommendation in context of runtime dependencies. In the following I reorganized the section in our CONTRIBUTION.md and added qttranslation to it. Quick n dirty proposal
|
Yes, I agree, that it is better to test everything. Currently we are inconsistent here since the
This does work for all "test-during-packaging" scenarios.
Yes, this is a good starting point to make these deps visible. |
Yeah, I don't like that either. Why not (after the next release) remove the skipping from them. See no reason why not.
Then they should join the discussion and tell us how we can solve this meeting the needs of upstream (us) and arch. |
The Arch Way is to follow upstream's recommendations and defaults. If I am missing build deps or check deps let me know and I will fix that. EDIT: I will say that building 1.4.0-5 in a clean buildroot (the recommended way of building) for me does not error out.
Is the issue that my build skipped 49 tests due to missing sshfs? |
Thanks for that output. Interesting. Most of the 49 tests should be related to a missing SSH server run. They are not about missing sshfs. If there is no SSH server running some tests are skipped. I would suggest to make an SSH server run. No further configuration is needed. The tests will generate and manage a key pair for that. When you run the SSH tests I assume that then you will get some errors about missing "sshfs". In the far away future I do plan (#1489) to separate the three tests types unit, integration and system tests. In that case distro maintainers can run them one after the other. Btw: Debian don't run tests on our package because our tests write to $HOME without using a fake-filesystem. |
This is unprecedented as far as I know. A build root is created based on the depends, the package is then built in that build root. On Arch, the default state of openssh is not having the server's service enabled/started. So sshd is installed in the build root but not active. As a test, I built the package on my native system (no build root). The native system has openssh installed and sshd running but not sshfs.
So it skipped 4 fewer tests having detected sshd I guess? No build failure Test 2 was putting sshfs on the system and building. Same result: 45 skipped and no errors. |
Interesting. On my own system it sometimes comes that I have to restart sshd, then it works. I don't know why it is that way. But it happens not often. The tests are skipped based on a variable created here: backintime/common/test/generic.py Lines 71 to 74 in 524efd3
Sounds easy to me. Could be more verbose (using
|
TLDR ;-)
Details
Requiring a running and configured So I think this shouldn't be done by the AUR package but instead we should refactor our unit tests as @buhtz proposed:
Yes, 4 tests are not skipped because they do simple ssh tests eg. by calling backintime/common/test/test_sshtools.py Lines 273 to 276 in 524efd3
All other backintime/common/test/test_sshtools.py Lines 37 to 38 in 524efd3
|
Re-opening because of the dependency update in CONTRIBUTION.md file |
Add qt-translation to dependency information and restructured that information. Fix #1538 [ci skip]
There is an ARCH/AUR comment proposing this:
https://aur.archlinux.org/pkgbase/backintime/
The text was updated successfully, but these errors were encountered: