Arbitrarily restricting ourselves from using bash because developers on
platforms like netbsd don't want to install bash from ports doesn't
make sense. Any non-trivial shell script is likely to use features
like arrays or string manipulation that are poorly supported (if at
all) by sh, and the continued bumping of the number of expected bash
scripts is an indication that the check is not serving its purpose
anyway.
Along with removing the check, all shebang references to /bin/bash
have been replaced with /usr/bin/env bash in an attempt to be more
compatible across different hosts.
Change-Id: Ief72dc380cc88af38959c330897e2c127e33c332
Closes-Bug: #1440824
Some oslo libraries assume that stdlib is already patched when
they are imported (e.g. oslo_concurrency.processutils tests the
'time' module for monkey_patching to detect which 'subprocess'
module to import.
This can cause issues when things like test frameworks import
modules that monkey_patch, as the order imports are made can break
this kind of check. It is always good to monkey patch as soon as
possible, hence trying to do the patching in neutron/__init__.py.
This is an alternative to https://review.openstack.org/#/c/153225/
which just patches neutron/tests/__init__.py. Unfortunately, just
monkey_patching in tests/__init__.py didn't fix all of the issues
I ran into. For example, tempest tests were failing with timeouts.
Closes-bug: #1418541
Change-Id: I7f2115a99acae5b6d61aab2f7334f498b8d99858
Namespaces are not used anymore, so imports are for oslo_concurrency,
not oslo.concurrency.
lockutils direct call is not supported anymore, so using shipped
lockutils-wrapper instead.
Use ExternalLockFixture to set lock_path for unit testing.
Updated cache and cache/_backends module from oslo-incubator to use
oslo.concurrency and not incubator version of lockutils module.
Dropped lockutils incubator module that is now moved to oslo.concurrency. Not
dropping fixture module that includes lockutils fixture since other fixtures
are still used in the tree.
Closes-Bug: #1387092
Change-Id: I2ba2295f8f5d55f272a9d23555940586b25b5a1c
On OS X, '*' is not a valid grep modified for '[^[:space:]:]', nor is it
necessary when the lines being checked against must be prefixed with
neutron.tests.
Also, dirname was being called with an empty var, without quoting, resulting
in usage errors.
Closes-Bug: 1391858
Change-Id: I34ab0625a00809f68b7a44cb3a175a57ba0bd6d5
"run_tests.sh -p" always checks every file for errors even though you
have probably only changed a handful. This patch adds "run_tests.sh -8"
which only checks the files that were modified in the HEAD commit or
in the current working tree.
It is borrowed from the recent nova commit b011325cc6.
The related ML post is:
http://lists.openstack.org/pipermail/openstack-dev/2014-August/043346.html
Change-Id: Ieeabf1b79a0790af8bde3144dca59b4245a0b79a
Change f20b1d42 which split the running of functional tests from
the running of unit tests caused running:
./run_tests.sh neutron.tests.functional
to fail as the OS_TEST_PATH variable will be defaulted to
neutron.tests.unit which means that the functional tests will not
be discovered in the above case.
This patch trys to detect an argument passed in the form of a
neutron.tests string and correctly sets the OS_TEST_PATH variable
based on it.
Change-Id: I8ccdc7f10d3c8478281aeaf8d02175d0eeb8d6e9
This was fixed for nova using this method and we are porting it here as we are
running into a similar bug as #1264058
Closes-Bug: #1269938
Change-Id: I06a2684629fd7b4d30e2d7716dc00a2ed0479f2f
In run_tests.sh, function init_testr will initialize testr if the
directory .testrepository is not existed. Actually, testr will do
the check before run the test:
In Python package testrepository, setuptools_command.py:Testr.run
68 def run(self):
69 """Set up testr repo, then run testr"""
70 if not os.path.isdir(".testrepository"):
71 self._run_testr("init")
So, init_testr can be removed safely.
Fixes Bug #1224285
Change-Id: Ia74d9fff92b8efba9b72e5c7387f761144daa193
This change renames everything to Neutron while providing backwards
compatible adjustments for Grizzly configuration files.
implements blueprint: remove-use-of-quantum
Change-Id: Ie7d07ba7c89857e13d4ddc8f0e9b68de020a3d19
We are explicitly trying to get rid of scripts like this and flake8 makes
this one non-necessary.
Fix run_tests.sh to run flake8 properly.
This reverts commit 42243d6eb2
Change-Id: I435e34b6acde7931a75f456ccc88da6476581643
Create a common script to call flake8 to share flake8 options and
make tox and run_tests.sh use this script.
Fixes bug: 1179331
Change-Id: I92dc54fa3f4bb22aa39bde226b6d769088f9a2e3
This change switches run_tests.sh to use testr
in parallel mode, instead of nosetests, in order
to enable unit tests to run in parallel.
By default, the number of parallel test processes
is set to the number of cores on the test machine.
A similar change was recently merged to nova:
https://review.openstack.org/#/c/15078/
Some tests required updating to remove inter-testcase
dependencies.
bug #1099694
Change-Id: Idfb923d424342a07dcba88d70b971683f549f763
Updates our run_tests.sh pep8 excludes so that match what we do
in tox.ini (Adds E711,E712 to the exclude list)
Change-Id: Iaf2cee898a957847d444aa7c48db1d4ad088ab6e
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: I49a1cbcb62e7f429eca3efe949b8aa90507723c4
Previously running run_tests.sh -p would *always* run
outside of the virtual environment. This commit makes -p
work equally well with -N (no-virtual-env) and -V (virtual-env).
Change-Id: I214404e85af2122b2ea7330e6496848a1e0d7ddf
also,this patch turn off pep8 E125 check,this for now seems to
be unnecessary,it check continuous line split.and update the
latest openstack-common https://review.openstack.org/#/c/9201
which has fix pep8 1.3 issue except for E125 check.
Change-Id: I86e6a3add56a0a2941031a1248f1696667ac56b8
Because the openstack common project does not stick to latest pep8 rules,
I have to exclude some bad-ruled files in the tox.ini and run_tests.sh.
However pep8 does not support exclude option in the format quantum/openstack/common,
so I have to exclude some of openstack common files one by one.
Also, I have changed the Qunatum Context to base on the common context.
I does not update the setup.py in our openstack common dir and the one
under quantum top dir, since it should be maintained in a consistent way
across all of openstack projects.
After this introduction, we are ready for notification feature.
Change-Id: I2729c2dc3958835374c88d704e842e613785ec14
This makes setting and calculating the versioning of quantum more
like other OpenStack projects, simplifying the work of the CI
and Release Management teams.
Addresses bug 916018 which prevents the quantum-tarball job from
running correctly.
Change-Id: I5b006ccc3d31c5d213c703853dfa38f04d983918
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: I93c7f6577b4c3a76b021f002bda59fcb8fac3f95
Change run_tests.sh for running pep8/pylint validation only
(also adds .pylintrc file)
Resubmitting this time making sure we run pylint for Quantum!
Also run just with -l for total number of messages
Run with -l -v for detailed pylint messages
Change-Id: I593c8aed4e0e6b06204c6c4308934da198778fd6
This change condenses the directory structure to something more similar to
what we had before while producing similar packages.
It also introduces version.py which allows us to get the version from git tags
(or a fallback version if not available).
Fixes lp bug 889336
Fixes lp bug 888795
Change-Id: I86136bd9dbabb5eb1f8366ed665ed9b54f695124
We now have a verbose flag (-v) for run_tests.sh if you want ot see all that
crap printed to the screen. The default behavior is just to print "test nam
.. OK". Also, we took the code from nova to cat run_tests.log if there is a
error so that if we hit an import error we will see it in the console jenkin
output.
Change-Id: Id8997c658a61691bf9f25b1c01e6a5db0eca428f
merge salv's fix to remove keystone middleware: lp855151
one more 202->200 from tyler
merge tylers additional 202 -> 200 changes
merge additions to OVS readme describing running with multiple hosts
merge brad's changes to make create API calls return 200, not 202
merge unit test for showing unset attachment
merging API docs branch
Merge: lp:~yinliu2/quantum/bug856564
Merge: lp:~bgh/quantum/bug850261
Change-Id: I56fe24c59f918737e57b562343c33ec6dcceac60
Remove output redirection from run_tests.
Remove PEP8 from run_tests; it's called from a separate jenkins job.
Change-Id: I6476a3031fe7a52ac52bec5d2ce75ced9590ab2a