tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~
According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293
Change-Id: I4a130d3b3d6ec1ca4d564ba7c17f6ce0486847d2
Since we use usedevelop=True, as a result os-ken
installation happens at 'develop-inst' phase and it installs
requirements from requirements.txt without considering
tox constraints. This can lead to issue where broken
requirements are installed in docs job and as a result
it will fail.
In order to get constraints be considered for this case, add
requirements.txt to deps for docs env.
Change-Id: Id2975423df7d7c643f10f25e64d61d3680fcb38b
The library "nose", used for unit testing, is removed. This library
is in maintenance mode and is not compatible with Python3.10 [1].
Now all checks are implemented using "unittest". The methods are not
loaded in realtime into the test case execution; instead of this, this
patch uses "testscenarios.WithScenarios", that allows to execute the
same test with different defined scenarios.
NOTE: "BgpSpeakerTestBase" tests are disable temporarily. It is needed
to configure "docker" in the system in order to execute them.
[1]https://nose.readthedocs.io/en/latest/
Story: #2010063
Task: #45519
Change-Id: I92e9547a26e9bec6c2a9a011c49a70b82dbb373e
This was spotted in [0] backport, upper constraints are not applied
correctly without it (and this aligns with the typical deps in other
projects)
[0] https://review.opendev.org/c/openstack/os-ken/+/823758
Change-Id: If2bbc92db09f3240ef9848f0db26ebcb709a2d3c
UPPER_CONSTRAINTS_FILE was not used for testenv:docs, and a recent
sphinx release seems to break pdf doc build, to avoid it use upper
constraints in tox.ini
Change-Id: Ica52306c9c2ca2d64161b09317735ed740bd4d32
Bump lower-constraints to versions supporting python 3.8 and with wheels
available and sync requirements
Bump hacking to 3.2.0 in order to work with Focal, disabling W504
to align with neutron and F405 (similar F403 is already disabled and it
needs a large fix)
Change-Id: I6b6329b2bb7a117f7426fdd63186d321290d9b67
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.
This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.
Change-Id: I27363c065ba3410db07a4d343854d9f3145da83a
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
It turns out that blank lines are not allowed in tables in
the latex builder. Otherwise, LaTeX complication fails.
A blank line in the docstring of 'bfd' class in os_ken/lib/packet/bfd.py
was dropped to pass LaTeX build.
Note that the structure of the generated PDF is not good (bad enough?).
This will be updated later.
Change-Id: Iec62042d4642d50d411478fadfa09e6a6bbf0a42
Story: 2006099
Task: 35137
Update the lower constraint for appdirs, similarly to how it has been
done in other repos.
Whitelist pep8 error E113. This is the "unexpected indent" error. This
module uses C-style comment blocks pervasively, things like:
OFPP_IN_PORT = 0xfff8 # Send the packet out the input port. This
# virtual port must be explicitly used
# in order to send back out of the input
# port.
OFPP_TABLE = 0xfff9 # Perform actions in flow table.
# NB: This can only be the destination
# port for packet-out messages.
OFPP_NORMAL = 0xfffa # Process with normal L2/L3 switching.
For the lines above the ones that have an indented comment with no code
to the left would get E113 with a recent change to a less permissive
policy. It would cause over 260 changes to comment strings, destroying
the consistency of comment style, to make that change. Therefore,
blacklist that pycodestyle error.
Change-Id: I6d2f463b50551f32bce863aa7dc0c70ad3054cbd
Story: #2005142
The install_command is used to install os-ken and its dependencies.
However, we don't want to constraint on installing os-ken since
it will fail. Therefore, this commit moves constraint to deps.
Change-Id: Ic4c0d72e9c54e1991cbf390a08b0614f19a2a7af
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I567b7fb703f095c9ac7c7732dfc1ac8b9a7b9cf7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
It seems tests weren't correctly run because of interactions between
travis CI env and tox venv. Also, run the scenario test on more
recent python3, as python3.4 is going away.
The test uses a lot of memory and fails with pypy, so it's disabled for now.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This patch add a new test using "autopep8" to keep codes reformatted
easily by using Python tool.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
pep8 has been renamed to pycodestyle and will be removed in a future
release.
This patch replaces pep8 by pycodestyle and adding some settings for
pycodestyle.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To prevent redundant files (e.g., pcap files, json files for tests,
packet data generator) to be installed, this patch separates test
directory from Ryu module.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This patch moves dependencies installation in tox.ini to .travis.yml
in order to avoid to install dependencies repeatedly when running
tox tests on locally.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Currently, in addition to "requirements for tests", test-requires
includes "optional requirements".
This makes it unclear to identify which packages are surely required
to use optional features (e.g., OF-Config, NETCONF, BGP speaker) and
causes the redundant installation when building Docker images.
This patch separates test-requires into two files("test requirements"
and "optional requirements").
Also, this patch reverts the version fixation for some packages.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
To check the code coverage of the unit tests on web, this patch
add integration of Coveralls.io (https://coveralls.io/).
Usage:
1. Sign in to Coveralls.io with your GitHub account.
2. Add repos at your account page.
3. Execute tests on Travis-CI.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
>From Ubuntu 16.04 LTS, the default version of Python 3 has been
upgraded to 3.5.1.
e.g.)
$ python3 --version
Python 3.5.1+
This patch enables to run unit tests on Python 3.5 environment.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Recently, Paramiko updates the requirements to 'cryptography>=1.1',
cryptography 1.0 is not compatible with PyPy < 2.6, but PyPy version
of Travis-CI is older than 2.6.
So this causes CI test error.
This patch upgrades PyPy interpreter version to 2.6 in tox environment.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
The Python core team[*1] stopped supporting python 2.6. Some Python
libraries started following the same path and trying to support 2.6
becomes painful...
For example, most of you already noticed, oslo.config dropped 2.6
support. I tried to work around it with the following commit:
2250171098
But this forces users of decent distributions (e.g Ubuntu 14.04) to
upgrade pip (old pip versions can't understand version conditions).
[*1]
http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Note: Though tests may not be enough, as far as running unit test,
this patch makes compatible with PyPy interpreter.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Recently, installed packages are cached by Wheel. It is serious when the package is using 2to3 with setuptools (use_2to3) for adapting python3. Because Wheel is caching the contents of translated. If the contents of translated are cached, it can't work properly in python2
Signed-off-by: Satoshi KOBAYASHI <satoshi-k@iij.ad.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Because Travis-CI has a limit of the log file to 4MB, this patch
suppress the output of unit tests by setting NOSE_VERBOSE in tox.ini.
tox.ini does not effect when running run_tests.sh locally,
so please run run_tests.sh, if the full log messages are needed.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
With this change, you can run "tox -e py34" to test python3 compatibility.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Disable pep8 "W503 line break before binary operator" warning for now.
The check was recently introduced by pep8 1.6.2.
Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>