- Package:
- src:backintime
- Source:
- backintime
- Submitter:
- Jonathan Wiltshire
- Date:
- 2024-06-30 11:54:03 UTC
- Severity:
- wishlist
- Tags:
In 1.2 upstream added a test suite. We should run it during build (cd common && $(MAKE) test) but it needs to be able to write to the home directory, which is disabled on Debian auto-builders. Need to find a solution to that.
Dear Jonathan, I would like to suggest to save time and resources and not fixing that Issue. The test infrastructure of BIT will be modified to a modern and more python-recommended solution (src-layout of the project folder and "tests" folder outside the package folder). To be honest this won't happen early because currently there are other more urgent problems for BIT that need to be fixed before restructuring the whole project layout/infrastructure (which would breaking everything in the first place). And "writing to home" seems like a bad workaround/hack. A unittest shouldn't write to a real filesystem. And IMHO (personaly not as upstream) distributors should support such an unusual solution. This is a problem that I also will take into account at upstream. I vote for closing this issue. Upstream will contact you when it is time to restructure the project infrastructure including the test suite.
Dear Jonathan, what is the current situation about that issue? There where some new releases of Back In Time in Debian. Do you workaround that problem on your Debian side? And how? Kind Christian
Hello, I try to learn here and that is why I asked. Do I get it right that the problem is that BIT do write and read from the users home folder. And that is not possible or not recommended on Debian's own build and test system. Am I right so far? To my knowledge as upstream maintainer this problem is not solved in upstream. So how do you do it on the Debian side? Does our BIT still write to Debians build system's users home folder or not? If not, how did you solved or worked around it? Thanks for your reply. Kind Christian Buhtz
No response to my questions. I also asked on the debian python team mailing list. Without response I'll close the ticket on next iteration.
Dear Jonathan, with help from the DPT I realized what is going on here. I had the wrong assumption that all Debian packages do run some kind of tests. I couldn't imagine it that Debian, which stands for high quality, do accept untested packages in its repo. That is why this ticket was kind of urgent to me. I didn't realized that BIT never had running tests at Debian. I thought the tests are "just broken". Please don't wast your time on workaround this ticket. It is just the tip of the iceberg. Our upstream tests do work with SSH server, generating SSH key pairs, installing them, running rsync, running other backintime processes, etc. Find a solution for writing to HOME won't save all problems. We do discuss this at upstream https://github.com/bit-team/backintime/issues/1489 My plan is to separate our test suite into unit, integration and system tests. Then you will be able to run just the unit tests. I do suggest making this ticket a "minor bug" instead of "wishlist". It is IMHO a bug having an untested package in Debian. "Minor" is a compromise. I would make it "grave". :) Kind Christian
Dear Jonathan, before investing my ressources into a solution can you please give me feedback about my proposal. Would this fit to your needs as DM and solve this bug? Kind Christian
Hi Christian, Wouldn't a simple solution be creating a temporary home directory and directing the tests there? From a quick look at the code, it seems os.path.expanduser is used to determine the home directory, and according to the Python docs[1], "an initial ~ is replaced by the environment variable HOME if it is set". Kind regards,