49 Commits

Author SHA1 Message Date
Andreas Jaeger
41870b6e55 Check that all po/pot files are valid
Perform minimal checks on po and pot files so that no broken files can
get imported.

Change-Id: Ib438faddb362eb8e61eaa64a870160196f16c594
Related-Bug: #1299349
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
2014-04-16 20:05:42 +02:00
ChenZheng
035abae6ef Sort requirement files in alphabetical order
This makes code more readable, and can check whether specific library
in the requirement files easily. We also enforce the check in pep8.

Change-Id: I032c3c3d29522ce85f64b21d6428d975e46cc701
Closes-Bug: #1285478
2014-04-08 13:29:58 +08:00
Steve Baker
df9fa6c0c4 Disable check_uptodate.sh check in pep8
Running generate_sample.sh currently produces an invalid heat.conf.sample
due to bug #1288586.

This change disables the check_uptodate.sh in the tox pep8 so that the
gate-heat-pep8 job passes while we find a more appropriate solution.

Change-Id: Ib20c4f892df68f7112d969d801a18a1a5bfbd474
Related-Bug: #1288586
2014-04-02 13:26:30 +13:00
JUN JIE NAN
5d82bfd973 Added testr-args option support for tox coverage
So we can check coverage for some test cases like:

  tox -e cover -- heat.tests.test_sqlalchemy_api

Change-Id: Icd721fbced34b4f6b9e550d927d8fcc4c6439ff8
2014-01-25 00:33:52 +08:00
JUN JIE NAN
20b854b836 Refactor heat gate testing contrib support
The existing code is running tests twice, one for heat, one for
contrib via adding two commands in tox.

This breaked tox single run. For example:

  tox -e py27 -- heat.tests.test_software_config

Except heat.tests.test_software_config is executed, all test cases in
contrib will be executed also.

The patch added contrib in discover list, which can make sure both
contrib in heat gate testing and does not break single test run.

Change-Id: I014d7b95c64287e1fd04a0ba69fce0de554a9a08
2014-01-21 16:18:01 +08:00
Jenkins
8f1d922f8b Merge "Add contrib to py26 and py27 gates" 2014-01-16 09:18:30 +00:00
JUN JIE NAN
6b1b49af7b Fix unused variables 2/2: enable unused var check
To make code simple and clean and enable unused local variables(F841)
check.

Change-Id: I420e4b3c8845efc616d447922122167af383dbc1
2014-01-08 18:01:05 +08:00
Randall Burt
74951a03fd Add contrib to py26 and py27 gates
Change-Id: I6e3792bd1fa7076d51321d788d1c272b178339e1
Closes-Bug: #1251380
2014-01-07 23:50:31 +00:00
JordanP
0bccbf3379 Update tox.ini to use new features
tox 1.6 allows us to skip the sdist step, which is slow. This does that.
It also allows us to override the install line. In this case, it's
important as it allows us to stop getting pre-release software we
weren't asking for.

Original patch by Monty Taylor, talked about here:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/015495.html

Change-Id: I9fe8a6cff149b3b79d434dc955c77a358c43031d
2013-12-09 13:53:45 +01:00
Dan Prince
5670ee7afb Ignore H803 from Hacking.
H803 checks for a period in commit messages, something the community
clearly rejected as a sensible check: periods in commit messages
should neither be rejected or required.

Change-Id: I754e10ca01b3e6f8c6482e1bcd4c2e2ca8c1cfc9
2013-10-14 21:11:56 -04:00
Jenkins
810131c471 Merge "Remove obsolete redhat-eventlet.patch" 2013-10-11 22:05:03 +00:00
Angus Salkeld
51d1214fec Move check_uptodate.sh into config/ and delete tools/conf
Having two sets of these scripts is just confusing.

Change-Id: Ia9e227c4c833d1c6edc040eb93d157b8557671fa
2013-10-11 13:29:47 +11:00
Mark McLoughlin
22241a2168 Remove obsolete redhat-eventlet.patch
See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.

As of this fix:

  https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
2013-10-09 21:43:02 +01:00
Steve Baker
6f81001f26 Add contrib to tox pep8 check
This implements Clint's comment in
https://review.openstack.org/#/c/48690/1 adding # noqa
to the relative imports and adding contrib to the pep8 check.

run_tests.sh -p now returns no warnings.

Change-Id: I05085151258a6d0f3cc348211f64533fd4cbded9
Closes-Bug: #1234938
2013-10-04 10:06:45 +13:00
Randall Burt
3991797483 Move Rackspace resources into contrib
Using plain discover to run tests in contrib until
I can figure out how to make that work via testr.

Closes bug: 1220798

Change-Id: I5669b90152efabfacbc4b786a67cd1f4b139521a
2013-09-24 12:39:58 -05:00
Clint Byrum
81def8b28d Remove py33 from tox.ini until eventlet is ported
There is no point in trying to run the py33 unit tests until eventlet is
ported to Python 3. Meanwhile the expected failure means we get a bunch
of garbage and extra lag time when trying to run 'tox' before sending to
gerrit for review/CI checks.

Change-Id: I343e24e77e097a2249a7ace1903faeaed71d7393
2013-09-03 11:36:49 -07:00
Angus Salkeld
223671658f Use oslo.sphinx for the doc templates
This is to make the look of the developer docs consistent
with the other projects.

Change-Id: If538b5fcc974606c1628ca4a510cd1f34cb631a2
2013-08-23 12:59:54 +10:00
Angus Salkeld
ca0bea47e5 Fix some flake8 warnings in doc/resources.py
remove doc from the ignore and just fix the issues in conf.py

Change-Id: I30833dd24409087c3482d2034a797fea3f90aa85
2013-08-22 12:41:14 +10:00
Steve Baker
ace02312a7 Exclude heat-cfn, heat-watch from pep8
They are due for removal in https://review.openstack.org/#/c/38228/
and are causing many H233 errors when using the syncronised
requirements versions.

Change-Id: Ie632de44360519a0f705052ebaf4fe1304a0c290
2013-08-08 14:13:07 +12:00
Jenkins
ef32cfc83e Merge "Update openstack.common.config" 2013-07-22 06:54:50 +00:00
Dirk Mueller
a26b1df477 Add a py33 tox environment
This way one can optionally run tests against Python 3.x

Change-Id: I578cc6f2e933fbdc469dd14d23e9cf5b9f1d246f
2013-07-19 23:02:11 +02:00
Émilien Macchi
919b377808 Update openstack.common.config
- Add generator.py from Oslo
- Add notifier from Oslo
- Add generator bash script used by other projects to generate configuration
files
- Update openstack-common.conf file

The patch https://review.openstack.org/#/c/36493/ needs
to be merged before this one. I'll rebase this patch and
generate the heat configuration.

Fix bug #1183275

Change-Id: Id7f24874b7e3e07d06dcf14bc381b9d630f67fc8
2013-07-18 12:01:02 -07:00
Angus Salkeld
3415564deb Fix and enable H303 and F403 No wildcard (*) import.
F403 is related the message is:
F403 'from bla import *' used; unable to detect undefined names

Change-Id: I486c0b2fc15a616e3fdf1e7e2eaeae1e45075537
2013-06-20 11:52:53 +10:00
Jenkins
440ada0c61 Merge "Gate on H703" 2013-06-14 08:53:26 +00:00
Dirk Mueller
42de764f9a Add bin/heat-manage to flake8 checks
Change-Id: I917e5b0aa571f2fced7df6a4818f32ce4b5f1561
2013-06-12 22:54:05 +02:00
Dirk Mueller
6e0807c225 Gate on H703
Fix fallout by avoiding multiple positional arguments.

Change-Id: Ie25f7b9041fa5df85a244cb237124440bb7d8e32
2013-06-12 17:59:01 +02:00
Angus Salkeld
8305f72ef2 Fix H702 errors and enable them
- Formatting operation should be outside of localization method call

Change-Id: Icedbb98e46a52b53db7143a4111da13466a26847
2013-06-12 12:50:09 +10:00
Angus Salkeld
ba40d0efb4 Add descriptions of the pep8 checks
Change-Id: Ida2be020b8ed7ea047e11c4b8fa2f5154a444977
2013-06-11 21:26:08 +10:00
Dirk Mueller
e83dbc1117 Enable H403
Fix the only two places where it triggered alongway.

Change-Id: Ib76e0e072c2d51a9c782f37d5f5df964f2db968f
2013-06-07 15:44:23 +02:00
Dirk Mueller
9b74b089a7 Fix Hacking H304 Warnings
And also enable it permanently.

Change-Id: Iae319ecaee86049bc25330e25c4f672e3b158851
2013-06-01 18:20:24 +02:00
Steven Dake
2e1d08eaa1 Rename requires files to standard names
From bug report:
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files and tools in the
general world are growing intelligence about them.

Change-Id: Ie0bdb4908f45e47db43e84cd0c5fdc5263c035f4
Fixes: Bug #1179008
2013-05-21 17:22:35 -07:00
Angus Salkeld
5b17402cb5 Fix PEP H101 (Use TODO(NAME))
Change-Id: I77c9caa650462725b7c686fbafd9753d046b138d
2013-05-21 21:15:33 +10:00
Angus Salkeld
efe10076a2 Fix PEP H902 (Use the 'not in' operator)
Change-Id: Ic3dec990d2fe43dd8841aadb7b87e8f26c2d0338
2013-05-21 13:01:54 +10:00
Angus Salkeld
28c5c494f9 Fix PEP H301 (one import per line)
Change-Id: I7b0c991c869c903e60123ad5bdf876b06d83e3e9
2013-05-20 21:55:53 +10:00
Angus Salkeld
796fe8a213 Fix PEP H402 "one line docstring needs punctuation."
Change-Id: Id0aa43187f6d5e62308f4b329bc9458a512d808d
2013-05-20 21:55:11 +10:00
Angus Salkeld
f67dc437f3 PEP: be explicit about what errors are ignored.
Change-Id: I362ba16c8a7b645c9befa7fcd4b0942773b0dbce
2013-05-20 21:53:14 +10:00
Steve Baker
843d1fd476 Exclude build/ from flake8 checks
Change-Id: Ie7b19f8488230e8538720b96c73b49453c6a3efe
2013-05-20 11:56:06 +12:00
Monty Taylor
1d79afc696 Migrate to flake8
Fixes bug 117244

Change-Id: Ide81366eb2240377160775830e2307aef6064f9e
2013-05-17 16:50:25 -07:00
Mark McLoughlin
e0d9982d40 Copy the RHEL6 eventlet workaround from Oslo
Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.

Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
2013-05-13 22:51:49 +01:00
Clint Byrum
144f5f1249 Remove unused jenkins arguments from tox.ini
These do not match the established testing patterns for OpenStack and
seem to be quite redundant. They also mention nosetests which is no
longer used.

Change-Id: I874a226b515f1a8ad24136eba81a40fc170435b9
2013-05-01 09:40:32 -07:00
Clint Byrum
405510e263 Use testr for running gate tests
Fixes bug 1172468

Change-Id: Ifd87e44d752b4b3c77b4ea8f38feceb03bccaebe
2013-04-30 13:51:31 -07:00
Steven Dake
637740a4f1 Update infrastructure to more closely match other OpenStack projects
This patch imports nova's HACKING.rst guidelines altered for Heat.
This patch imports nova's run_pep8.sh with some minor alterations.
This patch imports nova's hacking.py extensions to pep8.

This patch places the run_pep8 logic in a separate file rather than
having it spread between tox.ini and run_tests.sh.  The HACKING.rst
requirements as well as general pep8 requirements are then enforced
with run_pep8.sh.

Avoid running once the N802 rule until dependency changelogs are
less then 50 characters.

Change-Id: If46c14668eae3cf11b8fbff46d766cc589d701aa
Fixes: Bug #1131275
2013-02-28 20:18:01 +00:00
Mark McLoughlin
150d2ca694 Use oslo-config-2013.1b3
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.1b3 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.4' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.

Excluded code from oslo-incubator in the pep8 check.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-18 17:27:14 +00:00
Steven Hardy
760a187640 update tox.ini to pep8 latest (1.3.4)
Most of the core projects are currently 1.3.3, but since 1.3.4 is
the current latest it seemed best to align with the latest.A
Also add a check to run_tests.sh to ensure peoples local tests align
with the new gate version

fixes bug 1092057

Change-Id: I16dc7e51536781f7a14b7954c24b1aa078b37fa8
Signed-off-by: Steven Hardy <shardy@redhat.com>
2012-12-20 10:53:40 +00:00
Zane Bitter
da712e0ccd Don't use OpenStack plugin in tox
This plugin provides syntax colouring of the tox output, at the cost of no
longer reporting errors in test setup (instead it just reports no tests run
-> success).

Change-Id: Idf4f71a54af6303090d464b0846e563ac3776e4a
Signed-off-by: Zane Bitter <zbitter@redhat.com>
2012-11-14 10:34:13 +00:00
Steven Dake
da698d0bd2 Lock to pep 1.1
Change-Id: Ic363e8815c057219b2a7ba9dfc149d47378283e6
Signed-off-by: Steven Dake <sdake@redhat.com>
2012-06-15 08:44:23 -07:00
Jeff Peeler
a83fcc6aa3 Add functional test to verify jeos and stack ops
(Tox.ini has been modified to only run tests tagged with 'unit'
to prevent this test from running with unit tests.)

This test requires an OpenStack install present and will not run on
StackForge. This test creates a JEOS, waits for glance registration,
detects key registered with keystone, creates stack, and verifies over
SSH that:
- cfn helper script SHAs match tree
- verifies presence of wordpress
- verifies expected user data is present in multipart mime file

closes #112

Change-Id: I22a0dfe41986d466ac689c050fc33585e3e6229e
Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-05-23 16:53:33 -04:00
Monty Taylor
2fc479c684 Align with project standards.
Rebased from: Change-Id: Ifc9fff4f88dfaebe97b7caba4d603d23c645e346

Reviewed-by: Steven Dake <sdake@redhat.com>
2012-05-21 16:48:34 -07:00
Jeff Peeler
1b903f8b70 Add ability to automate testing with tox.
Install tox via easy_install. Tox automates the creation of multiple
virtual environments, each of which can be used with a different
interpreter or specific custom tests (and is what StackForge uses).

Signed-off-by: Jeff Peeler <jpeeler@redhat.com>
2012-05-08 17:39:08 -04:00