Commit Graph

24 Commits

Author SHA1 Message Date
Dan Prince
b8b3aa407e Add pep8 ignore options to run_tests.sh
Updates run_tests.sh so it uses the same pep8 ignore options
we do for tox. This fixes a slew of pep8 errors that will occur
with recent pep8 releases using Glance.

Change-Id: I0a9bb237f75eb307ee433cc6b1c5f78cd71dd02e
2012-11-25 21:22:10 -05:00
Joshua Harlow
5018ebfdc9 Allow for not running pep8.
Its not always wanted to run pep8 so we should have
a flag that can be used to disable it so that people
who do not want to run it can accomplish this.

Fixes: bug 1080907

Change-Id: I7f9dedbc7eca8421e0acf58e478c105f8b8de0c9
2012-11-19 16:08:59 -08:00
Dan Prince
6e99270283 Make run_tests.sh run pep8 checks on bin.
This updates the pep8 checks in our run_tests.sh script
so that we are scanning the bin directory.

Change-Id: I0ad51b7747edbcb0dbcfb72f92a43dd8f2efc768
2012-11-09 14:12:40 -05:00
Gerardo Porras
b075e90c8d Add noseopts and replace noseargs where needed to run_test.sh
Add of noseopts to the run_tests script so users can be
able to run tests adding extra options to be passed to
nosetests.
This option is currently in keystone but not in glance.
Fixes bug 1065758

Change-Id: I7c78749adb90b126da5bd9580da6bfd7c9e1bf54
2012-10-18 14:07:38 -07:00
Dan Prince
ede120a32d Updates run_tests.sh to exclude openstack-common.
We exclude openstack-common in tox.ini already. This change updates
run_tests.sh to match that behaviour.

Change-Id: I1bf5784193e63156bc5fe140ad6e403669c7909d
2012-07-13 14:10:56 -04:00
Alex Meade
0c0fd6acaa Clean up .pyc files before running tests.
Fixes bug 1015181

Change-Id: I5628de56464f882f804522c66d9ffbe35a3b21e1
2012-06-19 12:07:12 -04:00
Monty Taylor
de2a8a8d94 Clean up a few ugly bits from the testing patch.
The pep8 runner in run_tests.sh was still referencing run_tests.py
which no longer exists. Replaced that section with one that runs
pep8 the same way as tox.

Additionally, the first attempt at getting the test runner to do the
same thing with debug logging as run_tests.sh was doing became a bit
spammy. For now, actually have logging write out the log file in the
first place. Eventually, it would be nice to get this to properly
get spit out in such a way that nosetests would grab it and include
it in the failed test case output.

Change-Id: Ib5222a0c3507d5d7ede4d303c98323a622705301
2012-06-07 10:38:11 -04:00
Monty Taylor
898e732bd7 Just use pure nosetests.
The test suite can be run now with pure nosetests + the openstack nose
plugin. There is no longer any need for the run_tests.py.

Change-Id: Iad89a2c1cc567ba10919a52166b3309edef20009
2012-06-04 15:29:26 -04:00
Eoghan Glynn
64ab035f96 Add -c|--coverage option to run_tests.sh
A convenience for generating coverage metrics. Might make it
more likely that developers will review the coverage stats more
often, to identify pre-existing blackspots and avoid proposing
under-tested new code.

Change-Id: Iecd10ec529dd6e93d18a6763bf36667402640881
2012-05-03 14:58:46 +01:00
Brian Waldon
28f0dd425f Simplify pep8 output to one line per violation
Change-Id: Ia1df3d1fbdd21b1b8884848d27c3a2a567b51943
2012-01-30 20:39:20 -08:00
James E. Blair
37fc2b00c0 Rename .glance-venv to .venv.
This simplifies a number of Jenkins jobs which currently, other
than directory names, could be the same for all OpenStack
projects.  By renaming the virtualenv directory, the redundant
Jenkins virtualenv build and copy jobs can be eliminated.

Change-Id: I7916783d863e5184bad8293c3aed5ba119e374a9
2011-12-05 13:09:22 -08:00
Monty Taylor
6eb2831459 Removed some cruft.
Removed builddeb.sh - we don't use it.
Removed a reference to pep8 skipping vcsversion due to bzr bug.
Updated sqlalchemy in the pip-requires to allow/use 0.7.1 or later to match
Nova installs.

Change-Id: I2da2b39efd0b1b192a490509a44cb1f641b86092
2011-11-16 03:01:56 -02:00
Justin Shepherd
22c3e412cd Fixes bug lp:821296
Fixed exclude-dir to point to glance/tests/functional, now --unittests-only runs properly.

Change-Id: I237225fb49f1f4a284682768e888a2e03585cdf9
2011-08-05 09:49:03 -05:00
Justin Shepherd
486deeabd6 Implemented @utils.skip_test, @utils.skip_unless and @utils.skip_if functionality in glance/test/utils.py. Added glance/tests/unit/test_skip_examples.py which contains example skip case usages.
Fixed issue where ./run_tests.sh would not execute pep8. Fixed couple of pep8 violations in test_skip_examples.py

Change-Id: Id6eaa8768b663b4638fbca0e3bdf72b74969150a
2011-08-04 11:39:14 -05:00
Soren Hansen
327f7525c0 Move tests under the glance namespace. 2011-08-03 00:10:52 +02:00
Justin Shepherd
ae980abbb6 Installed nose-exclude, ./run_tests.sh --unittests-only add '--exclude-dir=tests/functional' to NOSEARGS 2011-07-30 00:12:44 -05:00
Brian Waldon
23a1457db9 adding run_tests.sh -p 2011-07-27 17:06:01 -04:00
Dan Prince
5e35359d45 Update tests and .bzrignore to use tests.sqlite instead of glance.sqlite. 2011-04-20 14:08:04 -04:00
Rick Harris
19d9a5d991 Including tests/ in pep8 2011-02-05 01:40:39 -06:00
Rick Harris
fe363898ce Adds --sql-connection option 2011-02-01 19:29:50 +00:00
jaypipes@gmail.com
9e4d7c8b0d Make run_tests.sh return failure when pep8 returns fail, and fix the pep8 error in /bin/glance-upload 2011-01-23 12:18:48 -05:00
jaypipes@gmail.com
96eb80f589 PEP8 fixes in /glance/store/__init__.py
Also makes run_tests.sh automatically call pep8.
Pulls in Nova's run_tests.py wrapper for prettying
up output from nosetests...
2011-01-19 14:22:41 -05:00
jaypipes@gmail.com
d59d1f1ca1 Implements Parallax API call to register a new image
* Adds unit test for Parallax API controller
* Adds stubouts for glance.parallax.db.sqlalchemy.api calls
  regarding images
* Adds --logging-clear-handlers arg to nosetests in run_tests.sh to
  prevent extra output in running tests when tests complete successfully
2010-10-12 14:01:12 -04:00
jaypipes@gmail.com
63fe51eab5 First round of cleaning up the unittests. Adds test suite runner, support for virtualenv setup and library dependencies, resolves issues with ImportErrors on cloudfiles, adds pymox/stubout support and splits the backend testing into distinct unittest cases. 2010-10-08 16:42:13 -04:00