Commit Graph

32 Commits

Author SHA1 Message Date
Chris PeBenito
85cac110be Change test runner to pytest.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2023-03-23 10:05:01 -04:00
Chris PeBenito
51a3e3aa98 tox.ini: Add dataclasses package for Python 3.6.
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
2023-02-07 10:05:44 -05:00
Chris PeBenito
562a181110 tests.yml: Enable Python 3.9 testing.
This requires NetworkX 2.6.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-07-28 14:48:54 -04:00
Chris PeBenito
36a4d851fa Remove pylint unsubscriptable-object exemptions.
Several class annotations were subscripted but pylint had a bug that did
not handle this. This is now fixed in pylint 2.8+.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2021-07-28 13:25:10 -04:00
Chris PeBenito
bef620512d AVRuleTest: Diasable pycodestyle W605 check on single line instead of everywhere.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-10-14 10:16:54 -04:00
Chris PeBenito
41632dce9d tox.ini: Add static type checking using mypy.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-10-14 10:16:46 -04:00
Chris PeBenito
49dd143df4 tox.ini: Split commands out to commands_pre.
Make sure any --version commands run first.  Split out compiling the C
extension in preparation for setuptools dropping its test runner.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>

# Conflicts:
#	tox.ini
2020-09-26 14:34:00 -04:00
Chris PeBenito
6fa333a276 tox.ini: Add missing parameters for checks.
apol and sechecker were missing from all of the checks.  Also change the
testenvs to use the main dependency list so there are no errors in stating
the NetworkX and Cython dependencies.

This also changes the environment list.  It adds pep8 and lint to the
default checking and changes the python versions to a generic Python 3 so
the baseline installed Python is used.  .travis.yml will be the
only place to specify which versions of Python to test for CI purposes.

Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-09-26 14:32:15 -04:00
Chris PeBenito
56b2fd1f47 tox.ini: Update Python version list.
Signed-off-by: Chris PeBenito <pebenito@ieee.org>
2020-08-22 20:46:38 -04:00
Chris PeBenito
6d7a672611 Update static testing and fix identified issues.
* Change pep8 to new pycodestyle tool.
* Load the policrep extension in pylint
2018-08-11 20:46:06 -04:00
Chris PeBenito
68a46ece0c .travis.yml/tox.ini: Update CI build for local SELinux userspace build. 2018-06-18 20:25:14 -04:00
Chris PeBenito
4a98b8315b Update code coverage configuration to include cython code. 2018-06-15 20:28:05 -04:00
Chris PeBenito
8c9c06e678 .travis.yml: Update for Cython use. 2018-06-15 20:26:49 -04:00
Chris PeBenito
51b53eb4a5 setup.py: Update for cython extension. 2018-06-15 20:26:49 -04:00
Chris PeBenito
856b56accb Update NetworkX support to 2.0. NetworkX 2.0 has API breakage.
Now SETools requires NetworkX 2.0+.
2017-09-23 14:03:26 -04:00
Chris PeBenito
e292a77c52 Drop support for Python < 3.4. 2017-09-17 09:43:13 -04:00
Chris PeBenito
fcadd71b24 Implement utility enumeration for policyrep classes.
Requires enum34 (not enum) package for Python < 3.4.
2016-08-25 19:13:06 -04:00
Chris PeBenito
0a91898ad0 Add Python 3.5 testing. 2016-05-06 08:39:44 -04:00
Chris PeBenito
7330b7894a sediff: add skeleton.
Implement the CLI parser and diff creation.
2015-12-18 11:21:13 -05:00
Chris PeBenito
070eb683f7 tox.ini: restore recreate option
Ensure a consistent virtualenv.
2015-12-17 11:08:35 -05:00
Chris PeBenito
0ad3155ac0 Build C extension for lint tox target.
Fix pylint import issues on TravisCI.
2015-12-02 12:44:45 -05:00
Chris PeBenito
8ab5498ba7 Misc fixes for pylint 1.5. 2015-12-01 09:38:08 -05:00
Chris PeBenito
b619166ba0 Initial apol commit. 2015-06-03 13:33:11 -04:00
Chris PeBenito
20ee139f3b SELinuxPolicy: add support for finding the policy to load.
Restore legacy CLI tool behavior for not having to specify a policy to load
2015-05-08 15:21:00 -04:00
Chris PeBenito
f817fe2c56 Fix tox lint target on CI. 2015-04-06 10:58:42 -04:00
Chris PeBenito
ffd32d38f8 Add lint to CI. Step back to single coverage test, on Python 3.3.
I decided kamino's original single-coverage tox.ini was better.
2015-04-06 10:07:22 -04:00
Chris PeBenito
695081fcc0 Add pylint configuration. 2015-04-06 09:38:58 -04:00
Chris PeBenito
86bf7f75c1 Drop recreate in tox.ini
Not necessary for CI testing, as the environment is always completely
recreated.  Developers can add '-r' to their command lines to recreate
the environments when needed.  The CI testing should catch issues if
something works locally only due to an environment anomaly.
2015-03-07 09:48:22 -05:00
Chris PeBenito
2d4b8869b2 Word around bug with the tox deps handling.
It fails using {[testenv]deps}, when it hits "py27: mock".
2015-02-16 16:55:08 -05:00
Chris PeBenito
ceb6736962 Implement included/excluded classes/permissions in PermissionMap.
closes #24
2015-02-16 16:31:18 -05:00
Fernand Lone-Sang
9bbbf40230 modified initial config for travis-ci
The following has been removed:

- HTML report, as it is not used at all and may require to define more
  environment

The following has been added:

- py27, py33, py34 specific coverage reports

NOTES:

- It is possible to use environment generators (http://tox.readthedocs.org/en/latest/config.html#generating-environments-conditional-settings)
  but this will make the implicit mode run more modes by default.
- As referenced at https://bitbucket.org/hpk42/tox/issue/120/substitution-breaks-for-commands,
  substitution for commands does not work yet. If substitution for commands is
  implemented someday, the tox.ini file would be simpler.
2015-02-16 11:13:29 +01:00
Fernand Lone-Sang
ba1869f658 add tox configuration file
From the project webpage:

"""
Tox is a generic virtualenv management and test command line tool you can use
for:

- checking your package installs correctly with different Python versions and
  interpreters
- running your tests in each of the environments, configuring your test tool of
  choice
- acting as a frontend to Continuous Integration servers, greatly reducing
  boilerplate and merging CI and shell-based testing.
"""
2015-02-16 09:43:21 +01:00