[apparmor] [patch] use in-tree python modules in all tests
Steve Beattie
steve at nxnw.org
Tue Jul 22 18:45:31 UTC 2014
On Tue, Jul 22, 2014 at 08:37:27PM +0200, Christian Boltz wrote:
> Hello,
>
> Am Montag, 21. Juli 2014 schrieb Steve Beattie:
> > On Mon, Jul 14, 2014 at 10:19:52PM +0200, Christian Boltz wrote:
> > > this patch changes several utils/test/*.py to use the in-tree
> > > python modules.
> >
> > Sorry, but I don't like this patch. The reason is that I don't want
> > to hardcode the local path into the tests; I'd like to be able to
> > use the tests to verify an installation of the utilities in addition
> > to checking during builds and development, and want to avoid making
> > it unnecessarily difficult to do so
>
> Good argument (and just some hours after the timeout deadline - your
> luck that I didn't commit it yet ;-)
>
> > (and yes, I'm aware a few of the
> > test scripts already append to the search path).
>
> Basically that was the reason why I wanted to add it to the remaining
> tests.
>
> > We currently don't
> > have a 'make check USE_SYSTEM=1' option yet to make it easy do so,
> > but I'd like to see one.
> >
> > If the runtests-py* scripts are breaking because of this and aren't
> > already doing so, they should be setting PYTHONPATH explicitly.
>
> Sounds like a good idea.
>
> Updated patch:
>
>
> Set PYTHONPATH=.. in runtests-py3.sh to make sure the tests use the in-
> tree python modules.
>
> Also remove "sys.path.append('../')" (and now-unused "import sys") from
> all tests that contain it for consistency and to make testing with the
> installed modules possible (even if we don't have a USE_SYSTEM option
> yet).
Thanks. Acked-by: Steve Beattie <steve at nxnw.org>
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140722/74904a3e/attachment.pgp>
More information about the AppArmor
mailing list