Commit Graph

30 Commits

Author SHA1 Message Date
Riccardo Pittau 6a2590ec6a Fixes for tox4
- use generic test template
- remove autospec in power test as we don't use actual libvirt
module to test. The libvirt-python module is fully mocked.

Change-Id: Ied36a8afb818422c643edca8a2feeec977b53551
2023-01-03 09:48:18 +01:00
Riccardo Pittau c17279ef35 Increase version of hacking and pycodestyle
Change-Id: I8eef87bd3201943436ee512b0795701438714bea
2021-08-02 09:44:54 +02:00
Riccardo Pittau b393a8bc1f Update min version of tox to use allowlist
The min version of tox is updated to 3.18.0 to replace whitelist_externals
with allowist_externals option [1]

[1] https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Ib6af12f2568c5dce819870227e278d4fe8be8887
2021-06-15 10:02:20 +02:00
Riccardo Pittau 24a6a7ccd7 Re-add coverage to test-requirements
It's in uppper-constraints so it should stay there.

Change-Id: I83560dd7ddc0947fff2e27230bc9f0de456373f3
2021-01-25 10:21:45 +01:00
Riccardo Pittau 4eaf2d663b Reconfigure tox.ini
Increase tox minversion to 3.9.0 to be compatible with inline
comments [1]

Move some test requirements to tox.ini

Remove lower-constraints environment from tox.ini

[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-9-0-2019-04-17

Change-Id: Ida88627aace41c4f445a108d22e5eed12247a127
2021-01-22 11:13:17 +01:00
Riccardo Pittau 5f43794cc1 Set min version of tox to 3.2.1
As recommended, since version 3.2.0 tox switches pip invocations
to use the module -m pip instead of direct invocation.
We set min version to 3.2.1 [1] to also fix the behavior of
--parallel--safe-build

[1] https://tox.readthedocs.io/en/latest/changelog.html#v3-2-1-2018-08-10

Change-Id: I766ef1cf1e5ede30d96a68f7cb8402bef63e99f1
2020-07-19 14:10:41 +00:00
Iury Gregory Melo Ferreira 4055482050 Upgrade docs
- Created doc/requirements.txt with requirements for docs,pdfs and
release notes.
- Updated tox.ini for docs build and added pdf-docs build.
- Updated do/source/conf.py with necessary changes to build pdf.
- Added sphinxcontrib-svg2pdfconverter to l-c

Change-Id: I98ade2140063aa3e33ca6287da2f0052fd4c5175
2020-05-15 12:11:55 +02:00
Iury Gregory Melo Ferreira 95ce839ea8 Stop configuring install_command in tox.
Currently, we are overriding 'install_command' to use 'pip'. This is
considered poor behavior and 'python -m pip' should be used instead:

https://snarky.ca/why-you-should-use-python-m-pip/

It turns out that this is the the default value provided by tox:

https://tox.readthedocs.io/en/latest/config.html#conf-install_command

So we can remove the line and simply use the default value.

openstack-discuss thread
http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014237.html

Change-Id: I333aac7ffbb012f169dcf6ee62e754c4832336be
2020-04-17 20:54:07 +02:00
Riccardo Pittau 40bed1ea88 Make flake8 tests more strict
Also increasing min version of flake8-import-order for some bug fixes.

Change-Id: I6cca85a87e2946998bb2e912aa44bd3d709562c4
2020-04-08 10:11:48 +02:00
Riccardo Pittau ec13cbad48 Bump hacking to 3.0.0
Change-Id: I6979eacbb9b4d062d7f0fb8228dbef6b97da416e
2020-03-31 10:15:18 +02:00
Riccardo Pittau d8191f9ab2 Enforce running tox with correct python version based on env
Since removing support for Python 2, we changed the basepython
value to 3.
This means that all the tox tests run with the default python
version available in the system.
This is not quite correct when running on environment such as
py36, py37 or py38, since they imply running with different
Python versions based on the environment.
To enforce the correct version we need to add the option
ignore_basepython_conflict available since tox 3.1.0 [0].

[0] https://tox.readthedocs.io/en/latest/config.html#conf-ignore_basepython_conflict

Change-Id: I6dfb295c9e18ac3ec0d79b186ab4cbe5cecd00bf
2019-12-23 11:27:21 +01:00
Iury Gregory Melo Ferreira 77de3d5bb9 Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

ironic-staging-drivers is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal - https://review.opendev.org/#/c/691178/

Change-Id: Iab168e51cdfed11a3982da717e6cb40dbcaabfd5
2019-11-27 18:57:55 +01:00
Riccardo Pittau 85e64777d8 Drop ostestr in favor of stestr
With this patch we drop ostestr to use stestr directly to avoid
current and future incompatibilities that can break the test
process, e.g. [1]

Also some minor changes:
- following recent changes to global requirements [2],
we update sphinx requirements locally
- removing py35 in favor of generic py3 test
- updating upper-constraints link to use opendev.org

[1] https://bugs.launchpad.net/os-testr/+bug/1827834
[2] If558f184c959e4b63b56dec3ca1571d1034cfe5c

Change-Id: I9328fa7e68e1e03a20182e728840075bea7c5ac6
2019-05-24 10:58:27 +02:00
huang.zhiping e0843182c4 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: I6b089c76f6a7aae9e4ad10e4429227523d47ddb9
2018-06-09 02:21:48 +08:00
Doug Hellmann 174a342433 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: I4b1ca0a1f067895640f0a71d6dd392d33e3def4e
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-23 10:36:03 +00:00
melissaml 3b87b4ef06 Replace curly quotes with straight quotes
Curly quotes usually input from Chinese input method.
When read from english context, it makes some confusion.

Change-Id: I3e99e14394469b1c16afe943dc69df5631f73186
2018-01-26 00:44:20 +08:00
Pavlo Shchelokovskyy 0ed6fd2a30 Improve `cover` tox env
Reuse `setenv` settings from parent `testenv` env

This is a followup to I3aefd97312bb9e5985e601dd192913247046d6e4

Change-Id: I4960a737a68ee146447cb6e4a5c6fe5b36a6dfc1
2017-09-26 08:46:59 +00:00
Pavlo Shchelokovskyy b4a0a06b66 Add stestr-specific files
os-testr>=1.0 uses stestr as test runner instead of testrepository.

This patch adds appropriate config and git ignore options for stestr.

Change-Id: I3aefd97312bb9e5985e601dd192913247046d6e4
2017-09-22 11:45:29 +00:00
Vladyslav Drok 1da32662b2 Specify ironic_staging_drivers as name of the app
Specify 'ironic_staging_drivers' as the name of the application for
the flake8-import-order plugin. That way it knows that imports of
ironic_staging_drivers should come after external libraries.

Change-Id: I7e8046baea6de65f9473f34fb84837380a41699a
2017-03-20 18:40:32 +02:00
Pavlo Shchelokovskyy 92865503a7 Update style checkers
bring ironic_staging_drivers pep8 checks in line with main ironic:
- update hacking version to the one from g-r
- add import order checks, with the same style
- enable same additional checks from hacking

Only two small violations found, so better to update now while it's
easy.

Change-Id: I12459a1ffdb122f50ce25230e310412f18717ef5
2017-03-17 20:37:57 +00:00
Zhenguo Niu e594bc52a9 Remove py34 env from tox
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from ubuntu Trusty to Xenial, where only python 3.5 is
available. There's no need to continue to keep it.

Change-Id: Iad33f7e1781432e17104d165aba377b7a6a40b1c
2017-02-09 11:11:30 +08:00
Jenkins 9c453ded6f Merge "Fix the 'cover' tox env" 2017-01-11 10:20:55 +00:00
Jenkins e70eb23225 Merge "Use upper constraints it tox envs" 2016-12-15 10:57:30 +00:00
Pavlo Shchelokovskyy 7b3e177723 Fix the 'cover' tox env
currently tox env for code coverage does not measure anything
as it tries to measure the coverage of 'ironic-staging-drivers' package,
while the actual package name is 'ironic_staging_drivers'.

This patch:
- erases current coverage data first
- fixes project name expected by 'coverage'
- adds coverage reporting in the end of 'tox -ecover' run
- omits tests file from both coverage and report
- adds 'cover' to .gitignore (auto-generated as part of coverage report)

Change-Id: I0044e3dd399934be706a06fd921972632efcceea
2016-12-14 20:09:43 +00:00
Pavlo Shchelokovskyy b287acfbd4 Use upper constraints it tox envs
Currently unit tests are broken due to upstream kombu/amqp changes.

Change-Id: Id71e2060139bf7de45f838bc87513dbfab04f21f
Related-Bug: #1638263
2016-12-09 16:11:03 +02:00
Pavlo Shchelokovskyy a4c2924b6a Add py35 to default tox targets
Ubuntu Xenial comes with Python 3.5 out-of-the-box,
and both ironic and ironic-staging-drivers are already gating against
py35 unit tests.

Change-Id: Ie1728d90b9eada194ae65aca15be5238edfa4ebc
2016-12-06 14:22:29 +02:00
Andreas Jaeger 1543af888b Cleanup tox.ini: Remove obsolete constraints
Remove old and unused constraints environments from tox.ini. Those
have never been used.

Note that the repo has in the past not used constraints in OpenStack
CI, this change keeps the status quo.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Idb24ac27d5653b5f0c7a5f618b475c9e278fcc8a
2016-08-26 18:05:05 +02:00
Lucas Alvares Gomes ba17b7c6fe Add reno for release notes management
Change-Id: Ia09a993d6ca7fa073db77be12035ec49a71db597
2016-02-08 14:41:18 +00:00
Lucas Alvares Gomes df49cb37b0 Install "ironic" in the unittest environment
This patch is adding an "extra-requirements.txt" file that points to the
Ironic's git repository which will be installed in the virtual
environment where the unittests will run.

Change-Id: I42ccbfde8f3381b9d77f85b3f676c0b455c62851
2016-01-28 15:16:30 +00:00
Lucas Alvares Gomes a27e38e50c Skeleton initial commit
Change-Id: I6b2c34135c79931defaccc6480e382f54a95d9a6
2016-01-26 12:48:24 +00:00