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

Re: Build OK, Test Failed



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.

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

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

Hope this helps,

Anthony


Reply to: