* 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
This syncs install_venv_common.py from oslo and reworks the
tools/install_venv.py script to use the new library.
Change-Id: I020eae1ec9e3a6aae0ecc7825c0ef723ab247f39
* Includes some general tools/hacking cleanup
* Fix several N302 cases
* Disable N302 until all cases are fixed
Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
The current tests are very opaque when something fails. This change makes the
failure easier to understand without a debugger. The testtools version is
bumped to get a new HasLength matcher.
Change-Id: Iceafa70f88a8cc31a1b0ba912fe32a9fef1b2f18
Python coverage lower than 3.6 causes issues when running the whole
test suite. Some arguments are randomly mixed up with script names,
resulting in unittest failures like this:
UnexpectedMethodCallError: Unexpected method call. unexpected:- expected:+
- exists.__call__('/tmp/buildd/.../nova/virt/images.py') -> None
+ exists.__call__('/some/path') -> True
Change-Id: Iadb6d046e3acc75c6ed5abffcfc1abda82aeee4f
XenServer 5.6 and 6.0 don't appear to be cleaning up sm locks when using
a FileSR. When enough locks accumulate, this causes image related
operations to fail.
This cleanup script is a stop-gap solution that can be run against all
of the dom0's in the cluster to prevent too many locks from
accumulating.
We can remove this script when the root-cause is fixed upstream.
References 1103158
Change-Id: I798bcfeb727a59003910b82d331fdbe031c4a2b4
Cinder client usage requires the "retries" parameter introduced in
cinderclient-1.0.1. This should be a constraint in pip-requires.
Change-Id: I36e8a363c9d4bb7cc4ecfda85644fc4284f17471
Moved global variables to the top.
Removed once used variables
Used option type definitions in OPT_TYPES
Change-Id: Ia0bf39933bac84dbf432e6b4590ceb2527e6889c
The main change is:
c5984ba Move logging config options into the log module
Re-generate nova.conf.sample to reflect the options move.
Change-Id: I3913ea54465658d93dc56e014dfe5d911b0541d6
Fixes bug 1102400
testtools 0.9.25 introduces a new dependency on the 'extras' package, but
it does so in a way to prevents itself from being installed without the
'extras' package already installed.
Work around the problem for now by avoiding the problematic release.
Change-Id: Ib42ffc67f00db62f9b829069c00476632daae94f
Previously we save the current commit hash before running lintstack.
This is no problem for Jenkins but not very friendly if we run
lintstack locally. Every time after it's done, git is in detached
HEAD mode. This patch remembers the current branch name and
automatically go back to the branch if available. Otherwise we fall
back to the commit hash.
Part of blueprint lintstack
Change-Id: I145df3027022fc9a8302bc6da9ab300f677f3386
* Fixes N403, along with docstring test
* Adds N404, multi line start
* Disable N403 and N404 until all cases are fixed
* Remove obsolote '--repeat' flag from tox.ini
Change-Id: Ibf6371efc1cdc764e66f6f7c5c4362440101f963
triggered by this slipping into quantum, now that we have more windows
developers we should ensure that \r\n doesn't land in the code as
a line ending. This check prevents it.
Change-Id: I0a82be0e74915d3c3c25203db110d279580c148b
To allow sharing of proxy code between nova-novncproxy and
nova-spicehtml5proxy, pull the NovaWebSocketProxy class
out of nova-novncproxy into a new nova/console/websocketproxy.py
file
Adds previously missing websockify dep to pip-requires.
Blueprint: libvirt-spice
Change-Id: If1334256680e7075598f00ce153cf6f021cc720f
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
pep8 and hacking.py (by inheritance) have the ability to run self
tests via docstrings, if we format the comments correctly, and change
the docstring test regex. Include self testing in our normal pep8
tests.
fix the comments to actually be test case compliant
fix nova_import_alphabetical to pass on short import lists (only 2
lines, starting at the beginning of a file)
comment where it doesn't appear that hacking.py tests are working
(though there could be deeper black magic in some of them).
fix a doc string in pep8 self tests that breaks N301
fix the fact that pep8 error strings are supposed to start with
\w\d\d\d, we were just lucking out on some formatting because the
string NOVA happened to be only 4 chars long.
Add a couple of escapes so that we don't recursively fail on our
own fail self tests for comments. (boy that's fun)
Change-Id: I14d5e04cfc092b37ec4967cd7485e9975a5eb820