#940319 backintime: run test suite during build

Package:
src:backintime
Source:
backintime
Submitter:
Jonathan Wiltshire
Date:
2024-06-30 11:54:03 UTC
Severity:
wishlist
Tags:
#940319#5
Date:
2019-09-15 14:16:25 UTC
From:
To:
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.

#940319#10
Date:
2022-08-29 10:10:37 UTC
From:
To:
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.

#940319#17
Date:
2023-03-17 13:26:12 UTC
From:
To:
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

#940319#22
Date:
2023-06-16 12:44:53 UTC
From:
To:
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

#940319#27
Date:
2023-07-21 08:56:46 UTC
From:
To:
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.

#940319#32
Date:
2023-07-31 07:57:58 UTC
From:
To:
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

#940319#37
Date:
2023-08-23 09:45:27 UTC
From:
To:
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

#940319#42
Date:
2024-06-30 11:51:16 UTC
From:
To:
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,