[Debian-med-packaging] Bug#732945: Debian-Bug#732945: python-csb autopkg test always fails

Ivan Kalev ivan.kalev at gmail.com
Tue Dec 24 08:41:38 UTC 2013


Hi Andreas,

Just to make sure that I understood everything correctly:

- you run the build as root
- then you run the test suite again as root and it passes, right?
- this bug appears only when you install the built package and then run the
test suite as normal user?

Is this all correct?

Here is some background. Our project supports several workflows:

1) csb developer: checkout/update from the repo, run all tests, write code,
run tests, commit, etc. The first time a developer runs the test suite,
some files get written to csb/test/data and remain there (virtually
forever). Next time the developer runs the test suite to verify their code,
these files will be read directly from csb/test/data. This is what I mean
by future use.

2) csb nightly build process: this is pretty much your workflow as well.
Checkout the repo in an empty directory, run the test suite, build package,
publish artifacts, wipe the entire checkout directory. The moment the build
bot runs the test suite, some files get generated in csb/test/data. These
are needed by some test cases and will get deleted along with everything
else  once the checkout dir gets wiped at the end of the build.

3) csb user: install package, use package. No test suites are necessary and
no files in csb/test/data need to get generated,  stored or used. If the
user decided to run the test suite for some reason (e.g. to verify that all
dependencies are properly installed), csb will attempt to generate the
missing files in csb/test/data. But as you observed, this is only possible
if csb/test/data is a writable directory. One workaround is to install csb
from PyPI with normal privileges and a prefix:

$ python setup.py install --prefix <alt location>

Another possibility is to modify our code to write these files in
csb/test/data, but if that is not possible --- to ~/.csb-test-files or
something similar.

Many thanks for your help!

Best regards,
Ivan
On Dec 23, 2013 4:00 PM, "Andreas Tille" <andreas at an3as.eu> wrote:

> Hi Ivan,
>
> many thanks for your quick reply.
>
> On Mon, Dec 23, 2013 at 12:39:46PM +0000, Ivan Kalev wrote:
> > Michael's address has changed indeed --- the correct one is
> mhabeck at gwdg.de.
>
> Thanks - updated the address in our packaging metadata.
>
> > The problem here is that these are not intermediate results, but rather
> > static test files that need to be installed once and cached for future
> use.
> > So a temp directory won't work here I guess. What do you think about
> > storing these files in "~/csb-test-files" when the install dir is not
> > write-accessible? We can implement that easily.
>
> Hmmm, I'm not sure what you mean by "cached for future use".  We would
> like to run the test-suite in the package build process which is usually
> done in a minimalistic chroot environment and there is only root as
> user.  This environment is deleted once the package is built (and the
> test has passed).  I'm not really sure how this fits your imagination of
> data used in the future.
>
> > By the way, this is probably an issue only when the PyPI package is
> > installed with sudo (which is not at all necessary when doing this type
> of
> > installation) and the test suite is useful mostly for developers, who are
> > supposed to checkout the repository anyway (rather than installing the
> > package). So I hope that the impact of this bug is not big.
>
> No, it is not really big.  We could even skip the test completely.
> However, we are always keen on verifying the functionality of some
> software we are bundling as Debian packages.  Thus we try to run any
> test that is available and makes sense.  If you think it does not
> make any sense this is no problem and we will disable it (which would
> close the bug report as well).
>
> > Best regards,
> > Ivan
>
> Thanks again for your response
>
>      Andreas.
>
> --
> http://fam-tille.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20131224/acb13e84/attachment.html>


More information about the Debian-med-packaging mailing list