Patch copied from nova:
https://review.openstack.org/#/c/110746/
'run_tests.sh -p' always checks every file for errors.
This patch adds 'run_tests.sh -8' which only checks the files
that were modified in HEAD commit or the current working tree.
time ./run_tests.sh -p
Running flake8 ...
./glance/async/eventlet_executor.py:29:80: E501 line too
long (82 > 79 characters)
real 0m11.489s
user 0m11.342s
sys 0m0.136s
time ./run_tests.sh -8
Running flake8 on doc/source/configuring.rst
etc/glance-api.conf glance/async/eventlet_executor.py run_tests.sh
./glance/async/eventlet_executor.py:29:80: E501 line too
long (82 > 79 characters)
real 0m0.604s
user 0m0.549s
sys 0m0.059s
Change-Id: I5fa9e85da017da3989a76caf95831f3ac927d1b7
Replace processutils and lockutils modules of oslo-incubator with
oslo.concurrency lib.
Change-Id: Ic1af8753a70f1aada22efe8132e48cbc16e14f3f
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Setting concurrency to 0 would enable Glance tests to be run using the
the total number of cores on the system rather than by a single one.
This would, by default, speed up the run time of tests for developers
who are not aware about it. Also, any jobs which run these tests for
Continuous Integration would be benefitted without having to deal with
the machine level logic.
Closes-Bug: #1368274
Change-Id: I0842b0c0be1272d479fad9ef7609cd8a29231cb5
The job glance-propose-translation-update
does not update from
transifex since our po files contain duplicate entries where
obsolete entries duplicate normal entries.
Remove all obsolete entries to fix the job.
Add test to pep8 that checks that no new breakages get
introduced.
Change-Id: I1bae1c1bf27bf664b24cf75fc96efb0fcfddc392
Closes-Bug: #1299349
OpenStack as a whole is moving towards using testrepository and
testtools for running tests. To that end, bring Glance into line by
switching it to use testrepository to run tests.
This copies run_tests.sh and tools/colorizer.py from Nova.
This change also has some minor changes to make run_test.sh work well.
Partial fixes bug: 1179009
Fixes bug: 1271806
Change-Id: Ic265bc0d2f1528358f6e8ee5b4139f991923fc72
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
run_tests.sh -N -p
it will call the flake8 installed on your host to detect PEP8, and
the flake8 plugin "OpenStack hacking" may not installed on your
host, so this command may not detect the OpenStack Style Commandment
supplied by hacking(e.g H202).
run_tests.sh -p
it will call the flake8 from virtual env, flake8 plugin "OpenStack
hacking" installed in virtual env will be triggered.
The result from "run_tests.sh -p" should be trusted, and jenkins uses
virtual env to run flake8 too.
When "-N" is enabled, emit warning to stderr to remind user.
Bug #1215396
Change-Id: Iac6be532b7b9bb911b745712712d1be363e8ff01
flake8 read [flake8] section of tox.ini as options.
function run_flake8 in run_tests.sh should be kept simple,
and tox.ini controls the behavior of flake8.
Fixes Bug #1212988
Change-Id: I35d434ccea1ca2f3ff93657e4ca6dde93bbbf29e
These are some text fixes in document, scripts and functions,
including variable usage, text aligning, adding new store class in
document
Change-Id: I98e226969d86698972870a7b3a042cb00c2206e9
The executable programs used by Glance have historically been scripts
in the ./bin directory. This patch converts all of the scripts to
entry_points. This change makes these programs python modules. Thus
they can be imported and methods in them can be called just like any
other module. This will allow the tests to call into these programs
directly instead of having to fork out a process.
The conf.py file in the doc tree was causing a name collision with
the python module cmd. The glance/glance directory was being added
to sys.path which made glance.cmd import with the name cmd. This
patch also fixes that problem.
blueprint: refactoring-better-faster-stronger-functional-tests
Change-Id: I67ae14b7403af31a5944befcd2ec27a690e81f15
This commit adds an update option to run_tests.sh. This option
is used to rerun install_venv.py on an already installed venv.
This will then just update out of date packages with pip.
Change-Id: I808f019de688387b14bc7a43eea4e45b05948e6b
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
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
This updates the pep8 checks in our run_tests.sh script
so that we are scanning the bin directory.
Change-Id: I0ad51b7747edbcb0dbcfb72f92a43dd8f2efc768
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
We exclude openstack-common in tox.ini already. This change updates
run_tests.sh to match that behaviour.
Change-Id: I1bf5784193e63156bc5fe140ad6e403669c7909d
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
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
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
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
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
Fixed issue where ./run_tests.sh would not execute pep8. Fixed couple of pep8 violations in test_skip_examples.py
Change-Id: Id6eaa8768b663b4638fbca0e3bdf72b74969150a
* 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