24 Commits

Author SHA1 Message Date
Joe Gordon
65ee45c641 Add pyflakes option to tox
* Uses pyflakes wrapper to ignore gettext errors
* Based on: https://bugs.launchpad.net/pyflakes/+bug/844592

Change-Id: I4fd947176f5258f89f517acf5dda2ded4a2da15e
2012-12-04 11:53:29 +02:00
Chuck Short
560e5cd84e Pin pep8 to 1.3.3
Apart of making pep8 version standard across all openstack
projects.

With this change we ignore E712 since it is normal to use
"column == True" in sqlalchemy.

Change-Id: I73a162847a79558cb158112878033edf18039805
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-11-19 21:20:42 -06:00
Yun Mao
add01f874a Upgrade pylint version to 0.26.0
Upgrade pylint to reduce false positives in lintstack.

Change-Id: I10ab7a46c6a70daf9151f03cd9fea3c4851e6ebb
2012-11-12 10:14:35 -05:00
Dan Prince
f0437edd8b Make tox.ini run pep8/hacking checks on bin.
This updates the pep8 hacking checks in our tox.ini file so that
we are also scanning the bin directory for HACKING violations.

Change-Id: I4b010ef4dd799f0afe0fcd56c823a611021e8f60
2012-11-09 12:28:46 -05:00
Joe Gordon
c39dbb53bc Fix and enable pep8 E502, E712
pep8 E502 and E712 were temporarily disabld when upgrading to pep8 1.2

Change-Id: If5158304cb8e73ef844dea9f726df6f8fe305269
2012-10-22 13:47:36 -07:00
Joe Gordon
fbc4568eb0 Update tools hacking for pep8 1.2 and beyond
* b9f72b1601
  broke tools/hacking.py
* Upgrade pep8 to 1.2 and disable the following new tests: E12,E711,E712,E721,E502

Change-Id: I32a8808c6c9cccfedcc4d2a26649333aca1cd713
2012-10-01 16:33:35 -07:00
James E. Blair
6e9f3bb10a Revert "Add full test environment."
This reverts commit 30e513309fe25af358b4d9ed47da2c7574fc0f06.

The python mysql module was removed from test-requires in favor
of test-options, but the work to actually use that was never
completed.  Revert the change so that mysql testing is actually
performed again.

Change-Id: Iaf35811cc748272229260f2dab95520995a69b44
2012-09-28 13:04:53 -07:00
Joe Gordon
0876cf5bc5 Do not run pylint by default
pylint creates some files, and leaves git in a detached HEAD.

pylint can still be run via 'tox -epylint'

Change-Id: Ic0193f2488f1c6eb4a9f0fabbe24ac9869239890
2012-08-28 15:14:11 -07:00
Yun Mao
09eb54c48f Add lintstack error checker based on pylint
Add a new silent test target lintstack based on pylint in Jenkins.
lintstack will compare the pylint errors between HEAD and HEAD~1,
filter out known false positives and report violations in pylint
original parseable format for Jenkins to consume.

Change-Id: Ic2962cb42a174bfe9535aea88475ff4ede3bf9ff
2012-08-24 15:36:47 -04:00
Jian Wen
55b37bef9b Disable I18N in Nova's test suites
Messages translated into other language like Chinese cause some
unit tests to fail.

Fixes LP bug #1037946.

Change-Id: I01d04333d28bab52d6f424432524b206f3845fba
2012-08-18 00:00:00 +08:00
Monty Taylor
b71e86d4d7 Fix broken pep8 exclude processing.
First of all, our pep8 exclude was excluding openstack, to trap
for not doing pep8 checks on openstack/common, which comes from elsewhere.
But, pep8 strips filenames down to basename when doing exclude checks on
them, which makes no sense. To fix this, grab the two functions from pep8,
fix them, and monkeypatch them from within hacking.py.

Patch has been submitted upstream as:

  https://github.com/jcrocholl/pep8/pull/111

Also, changed the exclude to catch just openstack/common.

Change-Id: If0b18ae828e74203f84a8b6f8b4ba0100b3bbc59
2012-08-03 12:15:44 -05:00
Joe Gordon
9b66e81d2b Use all deps for tools/hacking.py tests in tox
tools/hacking needs pip modules to accuratly run nova_import_module_only

Change-Id: I19eb624cc32a15438666e5710394a77d13b50763
2012-07-13 16:13:24 -07:00
Dan Prince
1ef88fdd5b Exclude openstack-common from pep8 checks.
Updates tox.ini and run_tests.sh to exclude openstack-common code
from pep8 checks.

Fixes LP Bug #1020792

Change-Id: I6bb9747f86f7677f0e9c4169c04d6f3fbd4b3480
2012-07-13 13:59:56 -04:00
Monty Taylor
8d8d3b4296 Run hacking tests as part of the gate.
Nova has additional pep8 "plugins" that they expect to run as part of the
gate. This patch will run tools/hacking.py instead of pep8 directly. Also,
it fixes the hacking violaions in contrib, plugins and smoketests.

Fixes bug 1010136

Change-Id: I86d8789218c197d5d4a43d1201465d340646a395
2012-07-02 08:50:41 -04:00
Jenkins
1a2a3519ee Merge "Use setuptools-git plugin for MANIFEST." 2012-06-28 21:38:53 +00:00
Monty Taylor
204a42c76f Use setuptools-git plugin for MANIFEST.
Instead of a hard-coded MANIFEST.in to list non-code files to be included in
the tarball, use the setuptools-git plugin to ensure that every file that's
in git will wind up in the tarball. The only things needed in MANIFEST.in
now are files that are generated as part of the sdist run.

Change-Id: I76df685d58f7b56977d859e8df92e845f450b3e4
2012-06-28 07:42:48 -07:00
Monty Taylor
30e513309f Add full test environment.
Add a tox environment that will install all of the optional
packages and which will run with system site packages enabled
so that we pick up those tests as well. This should allow us
to run expansive tests on jenkins that aren't normally required
locally, but which are possible.

Change-Id: Iabd61874061e24950d4d2082a2fba158b4601624
2012-06-25 14:00:31 -05:00
Monty Taylor
cf34a60157 Finalize tox config.
Shrink tox.ini to the new short version.
Fix the test cases to be able to be run in nosetets plus the
openstack.nose_plugin, which finally removes the need for
nova/testing/runner.py
Also, now we'll just output directly to stdout, which will
make nose collect the trace logging directly and either output
it at the end of the run, or inject it into the xunit output
appropriately.

Change-Id: I1456e18a11a840145492038108bdfe812c8230d1
2012-06-07 12:15:42 -04:00
Monty Taylor
e79356b86a Run coverage tests via xcover for jenkins.
In the jenkins jobs, we need to run coverage with xunit output so that
jenkins can parse it.

Change-Id: Ie4cfec6f89d6b37554b5345cde92f982397915e2
2012-05-25 15:36:50 -04:00
Brian Waldon
317378f742 Update pep8 dependency to v1.1
The latest release of pep8 adds stricter rules for extraneous
whitespace within lines. This patch also addresses these new
violations acoss the codebase.

Change-Id: Ib7e50281870473df1704ed50868c5c2e26bdb02e
2012-05-24 06:59:05 -07:00
Dan Prince
e3d7d3a805 Nail pep8 dependencies to 1.0.1.
Nails the pep8 deps for tox and test-requires to 1.0.1.
Fixes an issues causing pep8 failures due to a new pep8 release.

Change-Id: I30be4909f052c29834afbfddba6007045afa519b
2012-05-24 09:42:50 -04:00
Monty Taylor
b279d8a547 Allow sitepackages on jenkins.
Since our overall environment on the jenkins slaves is controlled,
it's safe to allow site-packages. BUT - more importantly, it's the
only way to get python-libvirt to be accessed.

Change-Id: I1181127a134afdfc1de58d0ab819395bb8995647
2012-05-07 14:07:18 -07:00
Monty Taylor
ff3f92008c Add missing directive to tox.ini.
Change-Id: Ib6d178af62f631de76e66c2bb6c07fd6b277fa97
2012-02-25 17:09:47 -08:00
Monty Taylor
51210081a8 Support tox-based unittests.
Change-Id: I6a0a616a979688595762e6b772d77a14f1968070
2012-02-20 11:54:37 -08:00