[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Build OK, Test Failed



On Tue, Mar 17, 2020 at 2:30 AM Anthony Fok <foka@debian.org> wrote:
>
> Hi Tong,
>
> On Mon, Mar 16, 2020 at 10:36 PM Tong Sun
> <suntong001@users.sourceforge.net> wrote:
> >
> > On Tue, Mar 17, 2020 at 12:29 AM Tong Sun
> > <suntong001@users.sourceforge.net> wrote:
> > >
> > > On Mon, Mar 16, 2020 at 9:41 AM Tong Sun wrote:
> > >
> > > > The go package that I'm packing builds OK, but its test failed,
> > > > because the tests need to be run as root.
> > > >
> > > > Is it OK that I overide dh_auto_test with
> > > > sudo dh_auto_test
> > > > ?
> > >
> > > Ok, I gave it a try, with
> > >
> > > override_dh_auto_test:
> > >         sudo dh_auto_test
> > >
> > > but none of the existing tests are running any more.
> >
> > Using
> >
> > override_dh_auto_test:
> >         fakeroot dh_auto_test
> >
> > the existing tests will run, but still failing.
> >
> > Any one can help?
>
> Next time, please give more details; telling us the Go import path
> would help because we need to see the actual code to be able to
> investigate and offer a solution.

All the details are posted in another thread. Maybe be because its
overwhelmingly details, nobody has pay attention to it yet.

> Lacking that information, my random guesses and suggestions are:
>
> 1. Check debian/control and see if "Rules-Requires-Root: no" is set
> (now inserted by default by dh-make-golang).
> Either remove that line, or, better yet, set it explicitly to
> "binary-targets", see
> https://www.debian.org/doc/debian-policy/ch-controlfields.html#rules-requires-root

Thank for Anthony for looking it this. The Go project is
https://salsa.debian.org/go-team/packages/golang-github-tonistiigi-fsutil/-/commits/debian/sid

as you can see I've been struggling to make it build.Here are the logs:

With Rules-Requires-Root: no:
https://dpaste.org/6GqZ

With Rules-Requires-Root: yes (or binary-targets):
https://dpaste.org/fip4

Here is my log,
https://paste.debian.net/1134965/
and we can see that with root it builds fine.

> 2. Skip the test(s) that require root access, just like how we skip
> the tests that require Internet connection.

I think that might be the only last resort. Just that the failed tests
are scatting all over the places I haven't figure out a good way of
doing that yet.

Thanks again for helping.


Reply to: