[apparmor] [patch] use in-tree python modules in all tests
Steve Beattie
steve at nxnw.org
Tue Jul 22 06:00:29 UTC 2014
Hi Christian,
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 (and yes, I'm aware a few of the
test scripts already append to the search path). 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.
> === modified file 'utils/test/minitools_test.py'
> --- utils/test/minitools_test.py 2014-03-03 22:59:47 +0000
> +++ utils/test/minitools_test.py 2014-07-14 20:07:21 +0000
> @@ -19,6 +19,7 @@
> import unittest
> import filecmp
>
> +sys.path.append('../')
> import apparmor.aa as apparmor
>
> # Path for the program
>
> === modified file 'utils/test/test-dbus_parse.py'
> --- utils/test/test-dbus_parse.py 2014-03-07 17:58:54 +0000
> +++ utils/test/test-dbus_parse.py 2014-07-14 20:02:32 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
> === modified file 'utils/test/test-mount_parse.py'
> --- utils/test/test-mount_parse.py 2014-06-03 21:23:30 +0000
> +++ utils/test/test-mount_parse.py 2014-07-14 20:03:11 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
> === modified file 'utils/test/test-pivot_root_parse.py'
> --- utils/test/test-pivot_root_parse.py 2014-04-23 20:41:03 +0000
> +++ utils/test/test-pivot_root_parse.py 2014-07-14 20:03:20 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
> === modified file 'utils/test/test-ptrace_parse.py'
> --- utils/test/test-ptrace_parse.py 2014-04-23 20:40:20 +0000
> +++ utils/test/test-ptrace_parse.py 2014-07-14 20:03:28 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
> === modified file 'utils/test/test-regex_matches.py'
> --- utils/test/test-regex_matches.py 2014-06-03 21:23:30 +0000
> +++ utils/test/test-regex_matches.py 2014-07-14 20:03:37 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
> === modified file 'utils/test/test-signal_parse.py'
> --- utils/test/test-signal_parse.py 2014-04-23 20:39:14 +0000
> +++ utils/test/test-signal_parse.py 2014-07-14 20:03:48 +0000
> @@ -9,6 +9,9 @@
> #
> # ------------------------------------------------------------------
>
> +import sys
> +sys.path.append('../')
> +
> import apparmor.aa as aa
> import unittest
>
>
>
>
>
>
> Regards,
>
> Christian Boltz
> --
> > Ansonsten: Ich sage nur "Diwasserstoffmonoxid".
> Ja, ein äußerst schädliches Zeugs, vor allem wenn es in
> guten Malt gerät. [A. Schreiber und R. Döblitz]
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
--
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/20140721/c0944cdf/attachment.pgp>
More information about the AppArmor
mailing list