Hi Saira,

I am glad to know there is a new potential Outreachy student! :-)

On Tue, 19 Mar 2019 at 09:13, Andreas Tille <[email protected]> wrote:

> On Mon, Mar 18, 2019 at 11:11:11PM +0000, Saira Hussain wrote:
>
> > What's the best way to use autopkgtest locally to emulate the test? As I
> currently
> > only treat them as  sh scripts and test manually.
>
> I admit I do it that way most of the time. ;-)  I also added a pbuilder
> hook for testing.  Pbuilder is a tool which builds Debian packages in a
> minimalistic chroot environment and thus the test is done in a chroot
> (but obviously did not fetched that last error - no idea why).
>
> I once followed
>
>    https://wiki.debian.org/DebianScience/Debci
>
> (see paragraph "Configure your system to run autopkgtest using lxc")
> but dealing with those lxc containers was not always easy and after I
> had some trouble I stopped this again (lazy me :-().
>
> I've put Liubov (last years outreachy student) in CC - may be she has
> some additional hints.
>

In case, you haven't found this already, here [1] you can read how to run
autopkgtest using different virtualizations (it's almost the same actually
that is in /usr/share/doc/autopkgtest directory). I am using schroot, but I
cannot say that it's the best choice since I haven't tried others. It's up
to you what to choose :-)

Most of the time you don't need to build the packages locally, just run the
tests you wrote with packages from distribution:

autopkgtest -B packages/mysrc -- *virt-server*

But in case there are other unreleased changes in the package (for example,
you have added new test data), as Andreas mentioned already, you may need
pbuilder or sbuild to build packages in a chroot environment and then to
run tests. I am using sbuild, so I put a couple of useful links below
related to sbuild [2][3]. You may find some configuration examples in my
ansible recipies [4]. Here is some additional information on writing
autopkgtests that was useful for me [4].

If you have any questions, feel free to ask.

Have fun and all the best,
Liuba.

[1] https://people.debian.org/~mpitt/autopkgtest/README.running-tests.html
[2] https://wiki.debian.org/mk-sbuild
[3] https://wiki.debian.org/sbuild
[4] https://github.com/liubovch/vagrant-debianVM/blob/master/playbook.yml
[5] https://ci.debian.net/doc/file.TUTORIAL.html

Reply via email to