In order to support running unit tests on RHEL 6.x we need to patch
eventlet with contrib/redhat-eventlet.patch. We already
have support for this in the tools/install_venv_common.py but we need
to make a couple changes to allow tox to consume this:
1) Sync in the latest intall_venv_common.py from oslo. This changes
patch to use the -N option (ignore already applied patches) and makes
it safe to call the patching function more than once.
2) Add a new patch_tox_venv.py script in tools.
3) Update tox.ini to call patch_tox_venv.py before it runs tests and
coverage.
Change-Id: I3e2b07c3f718e4aede5c5f231ff0cdb7721ec885
The nova gate should recommend 50 characters or less for a git commit
but actually enforce 72 characters.
This patch changes the hacking.rst docs to indicate the actual limit
is 72 characters rather then 50 characters.
Change-Id: I47f1f1f1007f5744bf1fef419df7e033803b4a53
Fixes: Bug #1144840
Fixes bug: 1140310
The oslo-config dependency referenced in pip-requires should be updated to
the latest version to include support for "deprecated_group".
This is needed to move specific driver options from the DEFAULT group w/o
losing backwards compatibility.
Change-Id: I5d18a5ee704a1f781c8acd6f903b0e3ca07bc070
Fix generate_sample.sh script so that we include options from the bin/
scripts too. In order to make this work, sync a zmq-receive fix from
oslo-incubator to delay parsing its config file.
Change-Id: Ia3f9083b2ebc16425dbad8a2a55c2d45f1ff2be3
If a module isn't importable due to an unexpected error during
__import__. Ignore it, hacking.py is only a style checker.
Fix bug 1134622
Change-Id: I704b7cc9a7bd415018ae7634767b7bd9c3b7d9b2
Previously: def foo():\n a = '''This is not a docstring'''
would be counted as a docstring even though it isn't.
Fix this and add docstring tests.
Fix bug 1100912
Change-Id: Id4d4aa382713eea340720e166e418262ba68eaaf
Fixes bug #1133262
There are no newer releases of PasteDeploy than 1.5.0 and we have no
reason to believe newer versions will break us. Indeed, if an
incompatible version is released, we will want to know about it quickly.
Change-Id: I331b33b16ea50202886b19bf5c4060d9fa46d5ec
Fixes bug #1133258
It looks like we should be fine with 1.13 and have no reason to expect
future versions will break us.
Cinder and Quantum both require >=1.12.3 too.
Change-Id: Ice0649d98e2a46505503072c07509fe274f195b6
Fixes bug #1133247
suds is used by the vmware driver and the dependency has always been
pinned to 0.4:
67e63ba8 (Sateesh Chodapuneedi 2011-03-07 18:10:48 +0530 17) suds==0.4
0.4 was released in September 2010 and there hasn't been a release
since. In fact, there has only been 16 commits since then and none of
them look to break the existing API.
If there's no reason to expect the next version to break us, we should
unpin. Indeed, we want to know early if upstream does break its API.
Change-Id: Icd2bdd021093293b2e4261a00d063239a3c42ce6
Fixes bug #1133216
We've been pinned to the same version of Cheetah since May 2011:
Cheetah==2.4.4
this was released in December 2010 and there hasn't been a release since:
https://pypi.python.org/pypi/Cheetah/2.4.4
There's no particular reason to believe a future release of Cheetah will break
us (only 6 commits since 2.4.4 and they all look like bugfixes), so we should
change to:
Cheetah>=2.4.4
Change-Id: Id3b22b84d2d693776f89ccb1d0c99d4e42fcab62
Fix missingImport logic to handle a module that cannot be imported, due
to a missing dependant module.
Due to the nature of this bug doctests cannot cover it.
Fix bug 1133103
Change-Id: Ia067bacc125b67e2d9e0cfc72495e4f13a8648ad
A number of tests have never been run due to another function having
the same name. Duplicate names have been changed and additionally
pyflakes check will now fail in such situations.
Also fix ovs ethernet driver test which was incorrect.
Change-Id: Icd93528395e65a24194a6ec5dfb8025a820d29b5
Syncs:
c78b2ab Avoid using cfg in install_venv_common
So that people don't need oslo-config installed to run install_venv
Change-Id: I05b69f043b276d5e6cd2df5d90bc679df6373383
This fixes all of the files incorrectly importing logging directly
and removes the workaround in hacking.py that was due to improper
from nova.openstack.common.log import logging statements.
Change-Id: Icfc25dc148c4a7b5fa7f6a7b609cd6c3d94efee1
This removes our workaround for namespace packages and improves
detection of missing imports due to non-existent dependencies.
Fixes bug 1130411
Change-Id: I89ee8249580e395f786289792cdf74219d041f2f
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
There were a few incompatibilities with the hacking tests and
OSX. Readlink -f doesn't work so use cd and pwd instead. Importing
a module with path separators doesn't work, so recursively import
the module. Finally the extra / in the find command was not needed.
Add a 'set -e' to run_pep8 to make sure test fails on any error
Ignore paste as it doesn't have an __init__ in its top level directory
Change-Id: Ifc66da7b872faa08f3be98f8b10486181ba77861
Tox and run_tests.sh were running PEP8 checks against different
file-sets. This patch refactors the logic to determine which files to
run PEP8 checks on into `tools/run_pep8.sh` where it can be called by
both tox and `run_tests.sh`.
Additional fixes:
Some of our Python XenAPI Dom0 plugins don't end in *.py but should
still be checked by PEP8. This patches fixes the hacking.py violations
in the files and adds them back to the srcfiles list.
Merged tools/unused_imports.sh into tools/run_pep8.sh
Change-Id: Id5edd1acb644ab938beffc3473494a179d9d8cda
* Implementing the * import detection (it is disabled for now)
* New style relative import testing based on syntax rules
* Old style relative import testing based on module search
* Inspection based solution replaced by PYTHONPATH search
in order to avoid module compile and initialization steps
(code execution) in a syntax checking phase.
This solution is faster and safer, but does not able to recognize
modules added dynamically to the module scope.
Change-Id: Ifc871f4fdbcd4a9a736170ceb4475f4f2cbe66bc
HACKING.rst was updated in I7534ef73e6fd525fd8f4bee594a4b37524699c08.
This adds hacking.py enforcement.
Change-Id: I5d75d536762449d0a7ae38213addd02aeceede0b
* Clarify wording (don't use 'success' and 'failure' instead use 'found'
and 'no regression test')
* If don't pass gerrit review number run on current branch. In
preparation for running via jenkins.
* If no tests were changed, don't run any tests
Change-Id: I5e876e4e5071fc27461d2411fc33db1bf1724405
run_tests.sh, with_venv.sh, and the install_venv.py scripts now
support relocating the venv root to another location.
All 3 scripts now support new envinroment variables to configure
the location of the venv and the tools directory. To maintain
compatability the defaults are set to the current values.
venv_path = Location of the virtualenv directory
Default: $(pwd)
venv_name = Name of the virtualenv directory
Default: .venv
tools_path = Location of the tools directory
Default: $(pwd)
Additionally the run_tests.sh script also takes these value as
arguments and will pass them along accordingly.
--virtual-env-path <path> Location of the virtualenv directory
Default: $(pwd)
--virtual-env-name <name> Name of the virtualenv directory
Default: .venv
--tools-path <dir> Location of the tools directory
Default: $(pwd)
DocImpact
Change-Id: I1be036058227206ecca342f692cd3d6aadb24069
Fixes: bug #1116942
Tool detects if a gerrit patch contains tests to detect a regression
Usage: ./tools/regression_tester.py gerrit_review_number
Change-Id: I6353d1efda73fe5fc3098f928b6da9a28eb40590
This commit syncs in the latest version of install_venv_common
from oslo, which fixes the import issue that was previously
addressed by change: I8a3df02a51c2c777d8f47cb8bc72d0644ae47095
which gets reverted by this commit.
Change-Id: I910610da5a4c413711819ca39627cb9ee94814ef
When running on latest released versions of Debian and RHEL/CentOS
we get Encryption failure with "ssh-keygen: illegal option -- m"
Fixes LP# 1102501
Change-Id: Ia54bf8f3e8d51c8baa09ba67d2e18ad214316989
NOTE: new dependency on pyasn1 python module
Added test case and support functions for CI opportunistic testing
using a PostgreSQL database, as part of our postgresql as a first
class citizen effort.
rebased again on top of test migration with data framework
clean up debug, and ensure pg will fail to connect gracefully
fix previous migration test which was inserting a key by id, which
postgresql doesn't like, as it doesn't adjust the autoincrement
counter.
added driver to connection string for mysql
Updated comment to expose how to do this on pg easily
Fixes:
bug 1084567
Change-Id: If0bfe5cf748f6d5724d17082be6d18b6f96f6ee4
On systems that don't use devstack the nova directory
doesn't automatically get added to the python path. This
breaks tools/install_venv_common.py which imports from
nova.openstack.common. This fixes the issue by manually
adding the nova root directory to the python path before
tools/install_venv_common.py is imported.
Change-Id: I8a3df02a51c2c777d8f47cb8bc72d0644ae47095