Commit Graph

100 Commits

Author SHA1 Message Date
Erik Olof Gunnar Andersson 7ba518eee6 Replace cover job with simpler working job
Change-Id: I5f34f2e82c4157154f815ac3f537daf52823a933
2023-04-02 23:54:11 -07:00
Erik Olof Gunnar Andersson 83de2e97c0 Fix doc failing to build properly
Change-Id: If6a54855893af066a4489408ebeaeed6c5869204
2023-03-03 14:38:42 -08:00
Erik Olof Gunnar Andersson 196aace962 Fix CI and temporarily disable integration tests
Zaqar is currently broken upstream. Until Zaqar is fixed
we need to temporarily disable the integration tests.

Change-Id: Ife54d48d41b7d1fd5b6129ccd4978e2eb46842ab
2023-01-03 13:48:28 -08:00
LeopardMa 57f239cc4d Update python testing as per zed cycle teting runtime
In Zed cycle, we have dropped the python 3.6/3.7[1] testing
and its support. Removing the py36 centos8 job as well as
updating the python classifier also to reflect the same.

[1] https://governance.openstack.org/tc/reference/runtimes/zed.html

Change-Id: I253757e2035dbe667905f011f9d05cc5d94e669e
2022-06-04 15:47:30 +08:00
zhangboye c1ea6c8ec8 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: I9dbfdaf06dc0769d122094d487e848597f960664
2021-04-20 14:15:34 +08:00
Erik Olof Gunnar Andersson 3b121536d2 Remove lower constraints
We are no longer supporting lower constraints.

Change-Id: I45db8edc5fae1018ff0d51254f95f096d2c4d716
2021-03-31 00:21:50 -07:00
Erik Olof Gunnar Andersson b391859cf9 Fixed lower-constraints job and updated constraints
This patch brings some pip packages up to date
and also introduces changes to tox to make sure
that constraints are always respected.

Change-Id: I7f794386b47ae9fd43db2278ee214e015d5b335b
2020-12-15 21:11:30 -08:00
gujin bf379ee6cc tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: I9c2c81c6f6e3064e91ceb1704e4b7cdf86fa8f01
2020-05-19 00:20:43 +08:00
Andreas Jaeger 30e5a90552 Fix requirements, update hacking
hacking already pins flake8, so do not add it, especially in conflict
with the hacking version. hacking also pins pycodestyle, so remove that
as well.

The repo is Python 3 now, so update hacking for a python3 version.

Blacklist new failures or fix them.

Convert own hacking checks to new flake8 API, update lower-constraints
for this.

Change-Id: I2928b9d764f61a53a549a9eb850c7809bdbb6f74
2020-03-30 10:51:45 +00:00
Ghanshyam Mann 29c0e6fbdf [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Senlin 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://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I0377788d0db0e60d44c35f1d26eefd58502a452a
2019-11-17 17:48:53 +00:00
Zuul 5da4c6830f Merge "Switch to the new canonical constraints URL on master" 2019-07-10 17:58:00 +00:00
Corey Bryant 08a32789d3 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: Ie33b1b1916f99d42d4d091a9532b8608f1a6fc47
Story: #2005924
Task: #34246
2019-07-05 16:12:18 -04:00
Andreas Jaeger bc12179412 Fix api-ref and docs building
The api-ref tox env is currently failing, see
http://zuul.openstack.org/build/fd7de0dbca1940b08878dd62ea750fe7 for one
example.

Fix it by using the proper requirements file.

Also, add bindep.txt file so that graphviz is available. The recent
change to not install the global fallback broke the docs building.

Change-Id: I3b76f1cb529a675da6ad9ba9bec3b72a66b460a1
2019-06-25 07:39:26 +02:00
chenke 1b62e1231b Switch to the new canonical constraints URL on master
Reference:
1. http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html
2. https://github.com/openstack/nova/blob/master/tox.ini#L17

Change-Id: I46c221ad3ffa064a3020017b5f5c8a1da5b228f2
2019-06-22 15:17:48 +08:00
wangqian a63a2aa3e0 Modify tox.ini
Replace git.openstack.org URLs with opendev.org URLs

Change-Id: I3bd4299daa74707e8f24e84749208014cfaf553b
2019-05-14 11:31:50 +08:00
Ghanshyam Mann 2ff270448c 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
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: I1eb89d01f16be1b5db36d09c6c4dacf4fef13593
2019-04-16 17:20:14 +00:00
Nguyen Hai Truong 50d00c425e Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Ib4a17e8e7c7162ba235a098de2cf08b8eeaf60fb
2018-11-06 20:49:58 +07:00
akhiljain23 ed4b8355a7 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: I2a5f53013c48ca22b19412d4b99f973f90aad8c7
2018-11-02 10:47:13 +05:30
Duc Truong d8df1f8c51 Add sphinx extension to document policies/profiles
This change adds a sphinx extention to build sections of the policy and
profile documentation from source code.

- Add new extension
- Modify contributor documentation for policies to show spec fields
  from source code
- Modify user documentation for policies and profiles to show properties
  from source code
- Modify user documentation for policies and profiles to include
  samples extracted from examples directory
- Update tox to run pep8 against sphinx extension

Change-Id: I32f68867d14c3288385dbdf3b4df14e8ca2fd01f
2018-10-24 16:59:06 +00:00
Nguyen Van Trung 2dcf354378 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I554926367bb01b3f77c664bad2c43cb6f529d9d8
2018-10-09 10:25:33 +07:00
Vu Cong Tuan cf0173ff5b Remove testrepository
This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository is unnecessary
and should be removed.

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

Change-Id: I41e98c69839909727968f98b52905a370d0ea626
2018-07-13 10:53:31 +07:00
Zuul 4f67e1853b Merge "Enable Python hash seed randomization in tests" 2018-07-08 15:18:26 +00:00
Doug Hellmann 4f330e8c7b 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: If690ed2c2e50b86abb1faa4bc1d1238fb688a90f
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-15 09:28:24 -07:00
Erik Olof Gunnar Andersson 4abe4041be Fixing openstack-tox-cover
Cover was broken as part of the switch to stestr.

Change-Id: Ia0eea9f966d15a62fffc1fcd76f8fd159808356f
2018-06-07 23:05:34 -07:00
wangqi b7eeec7459 Enable Python hash seed randomization in tests
Unit tests should run with hash seed randomization
on, to ensure code is not introduced that relies on
ordered access of dicts, sets, etc.

Python 3.3 enables this at runtime by default.

Change-Id: Ia9831b9c8d91fc7de82a1d215b00b498d01d562f
2018-06-05 13:49:06 +00:00
Charles Short 1c663223e7 Switch to using stestr from ostestr
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: Ia63e48a8ffee765a2d0ae43ff0054e3c5f61c992
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-05-30 15:55:57 -04:00
Doug Hellmann 84ee579710 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: Ia137d8db4e627d431c2dba3d1925faff33cd482f
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 18:16:38 -04:00
wangqi 28045a919a Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I8191c349c027dfe9a55720d204e5cda8655e7ffa
2018-03-11 16:39:21 +00:00
Yuanbin.Chen c0fc5acda8 Remove the api and functional tests.
The senlin tempest plugin has moved to
http://git.openstack.org/cgit/openstack/senlin-tempest-plugin

Change-Id: I29a97959c029184e626667b9683a5d307746019d
Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
2018-02-13 10:30:54 +08:00
Luong Anh Tuan 804c5ea0b7 Enable more extensions in pep8
This patch enable extensions:
-[H204] Use assert(Not)Equal to check for equality.
-[H205] Use assert(Greater|Less)(Equal) for comparison.

Change-Id: I31084170cd4cd4f4626aac459d9a61a4c5c67153
2018-02-07 16:05:47 +00:00
sunqingliang6 56f0e38882 Replace Chinese punctuation with English punctuation
Change-Id: I29ee7fa83c661cb7eaecebb6d7d8917282d2cf5d
2018-01-22 14:48:33 +08:00
Dai Dang Van 1eb39637ac Implement policy in code (1)
This commit will prepare for implementing policies in code [1].

Like oslo.config, with oslo.policy, we can define all of
default rules in code base and only change some rules
via policy file. Another thing that we should use yaml
format instead of json format.

[1] https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: I8cd6e148d9b6bb1dc61e2cb1728acafc325bca65
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
2017-10-19 14:24:29 +07:00
Jenkins 676e0c65d2 Merge "Fix tox ini for annoying warnings" 2017-09-13 04:43:21 +00:00
tengqm 13e67ba5d4 Attempt to fix os-testr based unit tests
The os-testr is becoming crazy. Let's see if this fixes it.

Change-Id: I2042877da083370e9a60795722e2e7734c2020ad
2017-09-12 10:39:42 -04:00
tengqm 0101d506d8 Fix tox ini for annoying warnings
There are some warnings that are not so interesting when running flake8.
This patch silents some of them.

Change-Id: If0c57c9b9eb14eaddb8a542a2ed9e9a4860b6043
2017-09-06 04:00:44 -04:00
Andreas Jaeger 0767f3a7fc Remove test for msgfmt import
The infra scripts test that msgfiles are correct and will not import
anything. Remove the test - especially since it fails when no
translations are available.

Change-Id: Idd48c9b6b55f08d0aa8a4d049730eee03cdc6eb1
2017-08-14 22:31:33 +02:00
zhanghongtao d59e40f460 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: I646c4d1e36d30eec921fe0e4bb8d288ee134fd4f
2017-07-26 14:39:23 +08:00
rajat29 c9980d7ade Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in error. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: I489f0bf6d0946217dc4c8e717f82054ae70d0c14
2017-04-25 09:37:11 +05:30
tengqm 423dab9091 Use py35 for api and functional tests
Change-Id: I767d4b811d86773ff3e28991a37f6c6cc75797ae
2017-04-06 22:25:22 -04:00
Luong Anh Tuan 8aae0867d1 Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.

[1] https://docs.openstack.org/developer/oslotest/features.html

Change-Id: I44ea49903b5a49ce0ab359d2ab9db62ab9eeb08d
Closes-Bug: #1666560
2017-03-13 02:51:15 +00:00
Cao Xuan Hoang a057248fe1 Remove a py34 environment 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 python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Icfef7cbcb79d3074164b5812184f8b2a27d005d0
2017-02-07 11:47:48 +07:00
qinchunhua c67163c6b3 Delete python bytecode file
This patch delete python bytecode including
pyo before every test run.

Change-Id: I962f50a3a09cabe365368c973fc7420d79e271db
2016-12-29 11:15:26 +00:00
Jeremy Liu c914eb14d7 Add a bandit environment to tox
This change is being proposed as part of the OpenStack Security Project
working session at the Austin 2016 summit. It adds support for running
the bandit[1] security linting tool against the Senlin codebase.
This change adds a targeted environment for bandit.

The bandit configuration has been tailored to exclude tests that are
currently producing warning against the codebase. These issues will be
followed up with bug reports and patches.

At the time of submission, Senlin passes all Bandit tests configured
in tox.

[1]: https://wiki.openstack.org/wiki/Security/Projects/Bandit

Change-Id: I54ef7329b9d6f6429838afdc5319f48bcc2e9f33
2016-10-31 03:30:24 +00:00
tengqm dce41dd2f5 Use constraints in tox.ini
As per email [1] from Andreas, we can add upper constraints on packages
used now.

[1] http://openstack.markmail.org/thread/a4l7tokbotwqvuoh

Change-Id: Iaaacbac9d931a9deb3cfb53afaa4d1c16e84508e
2016-08-11 21:25:57 -04:00
tengqm 1120911e96 Fix tox.ini for docs venv
In 'docs' venv, we are using 'rm' command without specifying that 'bash'
should be provisioned in the venv. This patch fixes it thus removes the
warning when building docs.

Change-Id: I0ef63d930c007d7a479a32f55c273771f4e904e4
2016-07-30 19:52:13 -04:00
yanyanhu 36f36cc691 Improve coverage test
This patch adds a test tool borrowed from Rally project
to enable test coverage comparison between master and
proposed branch. With it, coverage test will fail if
new proposed change reduces the unit test coverage.

Change-Id: I0de9cf84eb82e1846aae57c35e33c8b789a629cc
2016-07-22 01:01:47 -04:00
yanyanhu 4691081cb5 Fix coverage test
This patch fixes coverage test which is broken now.

Change-Id: Ibda2eb93cd1d3175185e75940d21215ce86dda2e
2016-07-19 06:25:56 -04:00
PanFengyun ebd9715308 Add Python 3.5 classifier and venv
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: I87d6445a451e380a290f4a6cf9364c621dc293e5
2016-07-15 10:43:34 +08:00
Jenkins f7ca8399d5 Merge "Define api test in tox.ini" 2016-07-05 05:46:55 +00:00
yanyanhu df5b2b896b Define api test in tox.ini
This patch defines 'api' test which is based on tempest
in tox.ini. User can perform tempest API test locally by
running 'tox -eapi'. It also fixes an error in README
file for tempest test.

Change-Id: If005adc03606198383e6b9fe38ecc8b8ffee02cc
2016-07-03 23:09:20 -04:00