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

Ivan Kalev ivan.kalev at gmail.com
Wed Dec 25 08:56:02 UTC 2013


Hi Andreas,

The problem with /var/lib or cache is that it won't work on windows. The
advantage of ~ is that python resolves it to user's home directory on any
platform. Transparent portability is somehow essential in csb.

But there are other options as well:

1) Use a temp directory and setup/teardown the text fixture every time.

2) Skip some tests at runtime if the resources they depend on are missing.
These tests are important during development, but not at all essential
during installation. So it is perfectly okay to skip them.

Both solutions are very easy to implement.

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

> Hi Ivan,
>
> On Tue, Dec 24, 2013 at 08:41:38AM +0000, Ivan Kalev wrote:
> > Just to make sure that I understood everything correctly:
> >
> > - you run the build as root
>
> Well, it is actually fakeroot (so faking to be root but without
> permission to write to /usr).
>
> > - then you run the test suite again as root and it passes, right?
>
> No, the testsuite does not pass.
>
> > - this bug appears only when you install the built package and then run
> the
> > test suite as normal user?
>
> In both cases it does not run.
>
> > 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.
>
> According to FHS it would be reasonable to write to
>
>    /var/{lib,cache}/csb
>
> I think this would fit your workflow as well, isn't it?
>
> > Many thanks for your help!
>
> Thanks for supporting our packaging by responding very quickly and helpful
>
>     Andreas.
>
> --
> http://fam-tille.de
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/debian-med-packaging/attachments/20131225/006e4525/attachment-0001.html>


More information about the Debian-med-packaging mailing list