Commit Graph

53 Commits

Author SHA1 Message Date
elajkat e26ff19a7c tox: Drop envdir
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: I6b87ff7ad426b6a872286eb18a97885863cc6ce1
2024-02-06 11:45:06 +01:00
Dr. Jens Harbott 7ef8db9c49 Fix for tox4.0
Drop global skipsdist option from tox.ini.

Change-Id: Ib464495bbedeeee801930e914a86e72b44865fa2
2022-12-28 06:20:50 +00:00
Dr. Jens Harbott 8bee5cc07e Fix tox.ini for tox4
Use allowlist_externals instead of whitelist_externals.
Execute shell script with bash.

Change-Id: If34dbe6c8456ade6e37951a70a89bc5d22de3048
2022-12-08 09:39:08 +01:00
elajkat c5a2214b4a Cleanup tox.ini
For details see the mail:
https://lists.openstack.org/pipermail/openstack-discuss/2022-November/031343.html

Change-Id: Ib1406e3c3c394765e289c36b0f3abccc36db467f
2022-11-29 12:09:39 +01:00
Ghanshyam Mann 41fb4259d8 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I807879cb17f1b5a97d75a5224dd339a0106aaeab
2022-04-30 20:29:15 -05:00
shanyunfan33 c955e8165a Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

Change-Id: I802a996bac02b30c46d71ba998bcf0c2961612dc
2021-12-24 16:50:07 +08:00
Jens Harbott 03876054ad Drop dsvm-functional tox env and related files
We no longer run any devstack-gate-based jobs, remove the tox env for it
and the auxillary files.

Change-Id: Ide2fe6ca75370c52180795cc2596be482c862523
2021-08-11 09:22:22 +02:00
zhangboye f9288d7f30 Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: I81b25470a7aab81e950301f8d38ae20bb722a255
2021-04-20 15:44:53 +08:00
elajkat d7a66c491e Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver for the release team.
Removed specific doc requirements from test-requirements.txt

Change-Id: I2d3a6e6bb0db372565458ea5eed4d84efdef37d2
2021-01-05 11:38:27 +01:00
Andreas Jaeger 045811b0d2 Fix docs publishing
This repo has been using the outdated pbr sphinx integration and thus
Ic5d22bbc3d1ece72a7611e023d54d456f6f1a211 broke docs publishing.

Use the new way of docs building everywhere with running sphinx-build to
fix docs publishing.

Change-Id: I839369ed9f61262d6f715ebaa491201218ff2d91
2020-04-08 11:30:56 +02:00
Bernard Cafarelli 777fb1638e
Drop python 2 support and testing
This is part of Ussuri goal tracked for Neutron stadium at:
https://etherpad.openstack.org/p/neutron-train-zuulv3-py27drop

Change-Id: I325e26fb190890d29fba015c5105b9488d71367c
2019-12-17 15:08:25 +01:00
asarfaty 0c98a88de7 Remove tempest path from setup.cfg & tox.ini
Commit I94a443c92fe2317ba2591ae3a227ec8df82ec294 removed the tempest
tests from this project.
This commit remove some leftover pathes to the tempest tests.

Change-Id: Ifd48004e26beedd92231ee730aa897ceb2945d84
2019-12-04 06:27:17 +00:00
Akihiro Motoki b6d13bdce5 PDF documentation build
Note that toctree_only option [1] is set to True in latex_documents
in doc/source/conf.py to get a better document structure in
the generated PDF file.

The above solution also helps us avoid a filename conflict between
the generated PDF file name and a PDF file converted from an SVG image
of the project badge where both files would be neutron-dynamic-routing.pdf.

Change-Id: I809040e0a4def90451f9a80c02c6f811af330bc9
Story: 2006099
Task: 35128
2019-09-04 13:13:45 +00:00
Corey Bryant 7a2b807d69 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ic1d48ed58750071d87c63c71fdceaec17aa9b0e8
Story: #2005924
Task: #34225
2019-07-05 13:51:37 -04:00
Ryan Tidwell a32c6f8c23
Convert CI jobs to python 3
This change ensures all CI jobs run against neutron-dynamic-routing
run with python 3 and all test code is compatible with python 3.

Change-Id: I77f940dca9239d710bb146e8cdf1d6058f2fbdd4
2019-05-21 13:58:53 -05:00
Zuul a3130d1fd1 Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-15 06:30:25 +00:00
gujin dace47cc07 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Ied57440e9e9f918ca685bd3738716cd52f7719b2
2019-05-13 21:09:03 +08:00
Zuul 59c27442d8 Merge "Dropping the py35 testing" 2019-05-12 18:57:19 +00:00
Ghanshyam Mann e8eb9e3715 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35 (and older)
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I738680a7d0c2b58c8917e35570b50e1fd5f3cc65
2019-05-11 16:10:28 +09:00
zhulingjie bb7a0fb1cb Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: Iaeebe7f3f76339f0c34c9e0f4db838ec192dbd83
2019-04-29 13:50:34 +08:00
Boden R 51986c5f75 stop using common db mixin methods
All of the methods of common db mixin are available via neutron-lib
and the mixin will be removed before long.
This patch switches the code over to use neutron-lib's APIs rather
than those of the mixin.

This commit also includes the following unrelated change
to pass the gate.
----------------------------------------
tox.ini: Remove symbolic links to fix issues in py3 jobs

2019-02-11 21:38:47.092425 | ubuntu-xenial | py35 runtests: commands[1] | find . -type d -name __pycache__ -delete
2019-02-11 21:38:47.093110 | ubuntu-xenial | setting PATH=/home/zuul/src/git.openstack.org/openstack/neutron-dynamic-routing/.tox/py35/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
2019-02-11 21:38:47.097926 | ubuntu-xenial |   /home/zuul/src/git.openstack.org/openstack/neutron-dynamic-routing$ /usr/bin/find . -type d -name __pycache__ -delete
2019-02-11 21:38:47.101454 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/plat-x86_64-linux-gnu/__pycache__’: Directory not empty
2019-02-11 21:38:47.101813 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/collections/__pycache__’: Directory not empty
2019-02-11 21:38:47.102118 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/encodings/__pycache__’: Directory not empty
2019-02-11 21:38:47.304506 | ubuntu-xenial | /usr/bin/find: cannot delete ‘./.tox/py35/lib/python3.5/importlib/__pycache__’: Directory not empty
2019-02-11 21:38:47.309574 | ubuntu-xenial | ERROR: InvocationError for command '/usr/bin/find . -type d -name __pycache__ -delete' (exited with code 1)
----------------------------------------

Change-Id: If4fa99d98e9507d9fefa84cd39d7d1d3381801a0
2019-02-20 11:51:04 +09:00
Boden R 19aed83ff1
Fix gate issues on master
We recently removed nenutron.common.rpc [1] as the rpc module lives in
neutron-lib now. This project was missed because I didn't find
neutron.common.rpc as an import. This patch switches rpc uses over to
neutron-lib.

This also addresses an issue where toxenv fails when it encounters a
non-empty __pycache__ directory. This adjusts the options passed to
find so that it is tolerant of this scenario and allows tox runs to
proceed.

[1] https://review.openstack.org/#/c/634790/

Change-Id: Ice83f7574f146436e3db045693b530f0cfeda049
2019-02-13 14:31:31 -06:00
Akihiro Motoki 1241f9b603 Convert policy.json into policy-in-code
This commit converts the existing neutron-dynamic-routing policy.json
into policy-in-code.

Partially Implements: blueprint neutron-policy-in-code

Change-Id: I4f99739ca8b979ddf69c52c3f1b36e320326db8d
2018-12-18 21:28:51 +00:00
Zuul a5a01bdacb Merge "add local tox targets for pep8 and py3" 2018-12-08 02:20:07 +00:00
Boden R 06b8542f7c add local tox targets for pep8 and py3
This patch adds local tox targets for pep8 and python 3 as per [1]
that will install dependencies in editable mode.
To run them use the pep8-dev and py3-dev targets respectively.

[1] https://etherpad.openstack.org/p/neutron-sibling-setup

Change-Id: Id6e30be7b063e3ae42590068d4a25b7c563d67a3
2018-12-03 13:31:32 -07:00
Vieri 3ff0ba1f27 Update min tox version to 2.0
The commands used by constraints need at least tox 2.0.  Update to
reflect reality, which should help with local running of constraints
targets.

Change-Id: I1d2d013695d783cee0ea3e8caf69a71da6a9028c
Closes-Bug:  #1801465
2018-12-03 11:59:22 +00:00
Doug Hellmann f245c52b3c fix tox python3 overrides
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: I383a87c917dcdf9469d57b55ab2630420e3ac87c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-11-11 06:16:31 +00:00
Slawek Kaplonski 93a8b15840 Switch to stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I9fd237292f7da50e60da398b1649001bf1829c66
2018-06-07 13:18:53 +02:00
Doug Hellmann b989411bad add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: I4d6fc19a8f7983ddb5c02f03cc6bc59fe4fa5b1a
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 16:28:51 -04:00
Andreas Jaeger 6d64726f24 Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon and neutron
now directly from pypi - or use the current branch in CI system using
tox-siblings.

Update tox.ini for this change and add neutron to requirements file.

Change-Id: Ifb0890e6d287dc24a654ac47d23cd9e1d7fb830d
2018-03-14 21:41:48 +01:00
loooosy 160456f438 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I553460a231ee27b63220c1540b39fd213e79e032
2017-07-20 09:18:37 +08:00
Gary Kotton 6a4916e313 Use flake8-import-order plugin
Automate the process

Change-Id: Ic2ff59ed8b5e4677117a5fca5ab32c26b2401724
2017-07-07 07:06:10 +00:00
Ihar Hrachyshka f941ca2c7c Switched remaining jobs to ostestr
This will, among other things, guarantee to us that if all tests are
skipped, the targets will actually fail instead of silently succeeding.

The only target that can't switch to ostestr is cover, but that's ok
because it's effectively duplicated by other unit test jobs to guarantee
that it runs some tests.

Change-Id: I837c2d9d76f0d48a949106bf12bb91ab2c041fa3
Related-Bug: #1683249
2017-04-26 21:13:05 +00:00
Ihar Hrachyshka 38784329a0 Remove subunit-trace fork
This makes tox use the latest version of the tool from os-testr repo,
which contains some valuable changes, like the one making the gate fail
if for some reason no tests are executed because all of them are
skipped.

Change-Id: If88be4b310d746ccc885e3d0c1db8a4dfabb2a28
2017-04-26 21:06:46 +00:00
Jenkins b8b7455eb9 Merge "Fix tempest api tests path for tox.ini" 2017-04-18 06:37:35 +00:00
Ihar Hrachyshka b57eb93f24 Fix tempest api tests path for tox.ini
Otherwise no tests are found, no tests executed.

Change-Id: I00ca2513486844dae018a070aaf368d74d222a1b
Related-Bug: #1683249
2017-04-17 17:56:48 -07:00
Ihar Hrachyshka 366e30670e Disable new N537 hacking check from next neutron-lib
Once a new neutron-lib release will be cut off, the new hacking check
will break the pep8 target because the code still uses translation
markers for log messages.

Instead of fixing all remaining log messages and hoping no new messages
land before neutron-lib release, we temporarily disable the check; we
will reenable it back once we have a neutron-lib release in gate that we
can validate the patch removing translation markers against.

Change-Id: Icef59a03184473476e0657334bcc30dc7bf4f9ff
2017-04-16 18:52:23 -07:00
Ihar Hrachyshka f41dcd375a pep8: switched to neutron-lib hacking checks
A recent hacking check landed in neutron broke the pep8 target for the
repo. Using hacking checks from neutron is error prone.

This patch switches the repo to checks from neutron-lib. It also skips
N530 check because the repo still imports from neutron.*

Change-Id: I70ce6698a3f25af39917ec7bdf1a31a1d4cabf89
2016-09-16 22:21:48 +00:00
Jenkins 2c4a8bfd2a Merge "Update tox.ini for upper constraints" 2016-09-01 17:33:27 +00:00
Jenkins b62744bcf8 Merge "Fixed "tox -e py27" warning message" 2016-08-29 15:45:08 +00:00
AvnishPal 6d3c8438aa Update tox.ini for upper constraints
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: Iab54f04d873d85c799e6b520314dd0f00db3c257
Closes-Bug: #1614361
2016-08-23 10:59:57 +05:30
Jenkins c91341b7bd Merge "Add Python 3.5 venv and classifier" 2016-08-17 06:12:18 +00:00
Jenkins 02480cfe82 Merge "Allow to run functional tests" 2016-08-17 06:01:17 +00:00
vikram.choudhary 294b615702 Fixed "tox -e py27" warning message
tox shows warning message as follow.

py27 runtests: PYTHONHASHSEED='3460558810'
py27 runtests: commands[0] | find . -type f -name *.py[c|o] -delete
WARNING:test command found but not installed in testenv
  cmd: /usr/bin/find
  env: /home/vikram/myData/work/openstack/neutron-dynamic-routing/.tox/py27
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.
py27 runtests: commands[1] | find . -type d -name __pycache__ -delete
WARNING:test command found but not installed in testenv
  cmd: /usr/bin/find
  env: /home/vikram/myData/work/openstack/neutron-dynamic-routing/.tox/py27
Maybe you forgot to specify a dependency? See also the whitelist_externals envconfig setting.
py27 runtests: commands[2] | sh tools/pretty_tox.sh

It seems that "find" command needs full path in tox.ini

Partial-Bug: #1560003
Change-Id: Iafd0ea9fc6a79859313c004845003c7e71c2c216
2016-08-16 13:32:22 +05:30
qinchunhua 067c90276a Add Python 3.5 venv and classifier
Now that there is a passing gate job, we can claim support for
Python 3.5 in the classifier. This patch also adds the convenience
py35 venv.

Change-Id: I6b74811ef13caa3006a52e331346acc59eaca017
2016-08-13 07:57:27 +00:00
fumihiko kakuma a2ebd8704b Allow to run functional tests
This change allows to run functional tests adding gate_hook.sh and
post_test_hook.sh scripts.

Partial-Bug: #1560003
Change-Id: I1d34e4f3eaf2ea8de9aab070513c6590e8e785dd
2016-08-10 14:01:20 +09:00
Henry Gessau bd0473b683 Enable DeprecationWarning in test environments
Many deprecations are triggered early (on imports, for example)
before the warnings are enabled by the WarningsFixture in the
base test class.

To make sure all DeprecationWarning messages are emitted we enable
them via the PYTHONWARNINGS environment variable.

Change-Id: I25c6d9fe0c50fd117a432ce6ca9a31e104503ffc
2016-08-09 18:53:05 -04:00
Gary Kotton 4815ac254e Remove check_i18n files
The translations are done via the pep8 checks. This code is no
longer needed and very out of date.

TrivialFix

Change-Id: I4313fd049d40341b6480828819e84fadd4eb4060
2016-06-08 10:24:56 -07:00
Jenkins af40ec1339 Merge "Move BGP service plugin, agent, and tests out of Neutron repo" 2016-05-17 02:48:16 +00:00
Ryan Tidwell 270b37f22b Move BGP service plugin, agent, and tests out of Neutron repo
This patch moves the BGP service plugin, agent, driver, and
tests out of the neutron repository and into the
neutron-dynamic-routing repository.

Partially-Implements: blueprint bgp-spinout
Partial-Bug: #1560003
Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com>

Change-Id: I80ea28a51d7b18e67d6ed4cd2da22520f950300f
2016-05-16 12:22:24 +00:00