Commit Graph

12 Commits

Author SHA1 Message Date
Stephen Smalley
d10c8b81d4 sepolgen: fix make test
make test in sepolgen was broken because checkmodule now requires
the module name to match the file name.  Fix it.

Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2016-09-12 09:42:38 -04:00
Nicolas Iooss
18a74d7885 sepolgen: remove additional files when cleaning
Remove the files created by Python 3 and refpolicy building process.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2016-05-09 08:15:41 -04:00
Nicolas Iooss
8e30f76c6d Update .gitignore files
Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
2016-05-09 08:14:54 -04:00
Robert Kuska
a280b06dd9 sepolgen: Edit tests so they pass even on Python3 where hash is random.
By default in Python3 hash uses random seed as salt, this leads to
different order in output from functions which rely on hash as are
dicts and sets. Tests in sepolgen relied on the frozen order.

Signed-off-by: Robert Kuska <rkuska@redhat.com>
2015-07-16 13:06:03 -04:00
Robert Kuska
a9fb9053f7 sepolgen: Close files after reading/writing in tests.
Signed-off-by: Robert Kuska <rkuska@redhat.com>
2015-07-16 13:06:03 -04:00
Robert Kuska
c2ecb8e3ec sepolgen: Replace usage of xrange inside of tests.
xrange function is gone in Python3 and instead range is
xrange by default. Also it doesnt seem to be important
to have xrange used in tests on Python2.

Signed-off-by: Robert Kuska <rkuska@redhat.com>
2015-07-16 13:06:02 -04:00
Robert Kuska
e25d39addc sepolgen: Replace deprecated *Equals functions in tests
Also remove usage of cmp in tests as cmp is removed in Python3

Signed-off-by: Robert Kuska <rkuska@redhat.com>
2015-07-16 13:06:02 -04:00
Nicolas Iooss
e4d693ae87 Use $(PYTHON) instead of "python" in every Makefile
This fixes the build with "make PYTHON=python2" on systems where python
is python3.

For PYLIBVER and PYTHONLIBDIR definitions, I tested Python 2.5, 2.6, 2.7,
3.3 and 3.4.  For each of them, these commands print the expected result:

    python -c 'import sys;print("python%d.%d" % sys.version_info[0:2])'"
    python -c "from distutils.sysconfig import *;print(get_python_lib(1))"

Acked-by: Steve Lawrence <slawrence@tresys.com>
2014-10-02 09:56:49 -04:00
Stephen Smalley
07e8f316da Fix sepolgen test case.
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2013-10-25 12:54:04 -04:00
Dan Walsh
8137b9392c Fix test matching to use proper constants 2013-10-24 13:58:38 -04:00
Daniel J Walsh
6e35202e20 sepolgen unit tests fail
Patch to fix unit test.

Signed-off-by: Joshua Brindle <method@manicmethod.com>
2010-03-24 13:43:53 -04:00
Joshua Brindle
13cd4c8960 initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00