| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: I6fce8ef0a293fb92c7e0ceb4ef88284e93022b54
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* run_tests.sh: tools/colorizer.py expects subunit v1 and not v2.
Convert the subunit stream to v1 if subunit-2to1 is present (this
indicates v2 of subunit is being used) before passing the output on to
tools/colorizer.py.
Fixes bug #1168516
Change-Id: I6be917181fa8d18764db89e741190964546d0632
|
|/
|
|
|
|
|
|
|
|
|
| |
Declarative approach to packaging, obviates the need for copying files.
Also, removes the need for setup.py to import files from the nova
module.
./run_tests.sh now ensure's that nova.egg-info/entry_points.txt is up to
date before running tests.
Change-Id: I7b7a18e065a62491ade54fbed5d8400db1d4e6c7
|
|
|
|
|
|
|
|
|
|
|
| |
This was actually a pretty simple fix. When I switched the base
test result class to testtools I lost the methods that were
printing out the errors at the end. This adds the (colorized!)
methods so errors print successfully.
fixes bug 1159116
Change-Id: Ib09d7e18ddf27015ff735a30137421d865382359
|
|
|
|
|
|
|
|
|
|
|
|
| |
while the colorizer is pretty, it has the problem that fail output
actually gets completely swallowed when it is turned on.
Revert the use in run_tests.sh for now until it can be sorted out
so we don't prevent people from using run_tests.sh to do development.
Fixes bug #1159116
Change-Id: I3e6dfdc03c7b033ff132c00a51a368dae9789266
|
|
|
|
|
|
|
| |
Also attempt to keep test results together and print out a nice
display of the ten slowest tests.
Change-Id: Ib54eb6dede8650ebafc3f069ee7b4a8c4c1a523c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Actually loading the coverage module was leading to odd concurrency
conditions where it was interfering with mocked calls. This changes
to stub out the coverage class with a fake one so that we don't have
to worry about collisions. It also modifies the coverage class to be
created lazily so it isn't automatically started at import time.
Finally it removes the hack in run_tests.sh ignoring the coverage
tests.
Fixes bug 1131023
Change-Id: I39de434454f8b0903f6311e731e215a93027bc91
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Testr doesn't directly support running tests with pdb so the --debug
option was pulled from run_tests.sh during the testr switch. Add the
flag back into run_tests.sh and have it run tests with testtools.run
which allows users to import pdb in tests then run them without
interference from testr.
Example usage:
# First edit test file to import pdb.
run_tests.sh -d path.to.test
If the test is not given on the command line all tests will be run.
Change-Id: I4afca9ca997ccb6c575b714b778a9db8306c7891
|
|
|
|
|
|
|
|
|
|
|
| |
Running pep8 results in the following error:
Traceback (most recent call last):
File "tools/hacking.py", line 34, in <module>
import pep8
ImportError: No module named pep8
Change-Id: I31a8bfbffa9ddee306ab414fab367c74d34fdd6b
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previous fix (4c891b9243985bb95d8beff8affa9db470a1c94a)
changed how the args are parsed but didn't update the logic
for handling testr args/opts. As a result args/opts for testr
where not be properly passed.
This fixes corrects that oversite and now properly parses those
args as well.
Change-Id: I418b0478b2a180e497d041fcab25158c52f44bac
Fixes: #1116942
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tox and run_tests.sh were running PEP8 checks against different
file-sets. This patch refactors the logic to determine which files to
run PEP8 checks on into `tools/run_pep8.sh` where it can be called by
both tox and `run_tests.sh`.
Additional fixes:
Some of our Python XenAPI Dom0 plugins don't end in *.py but should
still be checked by PEP8. This patches fixes the hacking.py violations
in the files and adds them back to the srcfiles list.
Merged tools/unused_imports.sh into tools/run_pep8.sh
Change-Id: Id5edd1acb644ab938beffc3473494a179d9d8cda
|
|/
|
|
|
|
|
|
| |
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: Iac065f71a64a6a7f7f2ee000ee01be9f78af6754
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Implementing the * import detection (it is disabled for now)
* New style relative import testing based on syntax rules
* Old style relative import testing based on module search
* Inspection based solution replaced by PYTHONPATH search
in order to avoid module compile and initialization steps
(code execution) in a syntax checking phase.
This solution is faster and safer, but does not able to recognize
modules added dynamically to the module scope.
Change-Id: Ifc871f4fdbcd4a9a736170ceb4475f4f2cbe66bc
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
run_tests.sh, with_venv.sh, and the install_venv.py scripts now
support relocating the venv root to another location.
All 3 scripts now support new envinroment variables to configure
the location of the venv and the tools directory. To maintain
compatability the defaults are set to the current values.
venv_path = Location of the virtualenv directory
Default: $(pwd)
venv_name = Name of the virtualenv directory
Default: .venv
tools_path = Location of the tools directory
Default: $(pwd)
Additionally the run_tests.sh script also takes these value as
arguments and will pass them along accordingly.
--virtual-env-path <path> Location of the virtualenv directory
Default: $(pwd)
--virtual-env-name <name> Name of the virtualenv directory
Default: .venv
--tools-path <dir> Location of the tools directory
Default: $(pwd)
DocImpact
Change-Id: I1be036058227206ecca342f692cd3d6aadb24069
Fixes: bug #1116942
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The run_tests.sh script invokes
bash -c "${wrapper} $TESTRTESTS | subunit2pyunit"
where '${wrapper}' expands to 'tools/with_venv.sh'. Due to shell
precedence rules, this only applies to '$TESTRTESTS' not the
'subunit2pyunit' part of the command. The 'subunit2pyunit' binary
though may only be available from the .venv
Change-Id: I5972c8f77b3f50a3713881e6ca1acbaeabbd47d4
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
|
|/
|
|
|
|
|
|
| |
When running through run_tests.sh, filter the testr output through
subunit2pyunit so that incremental progress can be seen. Should be
a step towards folks seeing incremental test progress.
Change-Id: Ic90669acabaa1c8b64aae80349bff3d3deaf59fa
|
|
|
|
| |
Change-Id: Idba469fbd8c0488a308071de45e16eedcb1d6cc6
|
|
|
|
|
|
|
| |
Remove all currently unused imports
Prevent future unused imports
Change-Id: I6ac26d5c71b79952a7732db300355a00310c712e
|
|
|
|
|
|
| |
Fix all N302 issues, and re-enable.
Change-Id: Ic94d144c915b228b7ff2fd9c5951875e159ffcdd
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Includes some general tools/hacking cleanup
* Fix several N302 cases
* Disable N302 until all cases are fixed
Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A test failing doesn't make coverage useless, so we should always
generate it.
Change-Id: I3ed9e54213c7fb6756906553920d19c5075e1adb
|
| |/
|/|
| |
| |
| |
| | |
Backup files (foo~) are not interesting for a pep8 report.
Change-Id: Ib4a43271c8a0ec47d63e61c45125e3f282415927
|
| |
| |
| |
| |
| |
| |
| | |
Using the setup.py testr command in run_tests.sh will sync run_tests.sh
up with the way tox currently runs the tests and collects coverage.
Change-Id: I21e3965280b3242a860c6be49c4dca44f197b03a
|
|/
|
|
|
|
|
|
|
|
| |
Nova coverage was broken because additional coverage tests were added
that interfere with collecting coverage during unit testing. These new
tests were not properly excluded by the coverage unit test regex. Modify
the regex to exclude any tests of the form '.*test.*coverage.*'. This
allows `tox -ecover` and `run_tests.sh --coverage` to run properly.
Change-Id: Id35f50ec335707c9eadb0e7fb3aa0833661f7333
|
|
|
|
|
|
|
|
|
| |
* Fixes N403, along with docstring test
* Adds N404, multi line start
* Disable N403 and N404 until all cases are fixed
* Remove obsolote '--repeat' flag from tox.ini
Change-Id: Ibf6371efc1cdc764e66f6f7c5c4362440101f963
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pep8 and hacking.py (by inheritance) have the ability to run self
tests via docstrings, if we format the comments correctly, and change
the docstring test regex. Include self testing in our normal pep8
tests.
fix the comments to actually be test case compliant
fix nova_import_alphabetical to pass on short import lists (only 2
lines, starting at the beginning of a file)
comment where it doesn't appear that hacking.py tests are working
(though there could be deeper black magic in some of them).
fix a doc string in pep8 self tests that breaks N301
fix the fact that pep8 error strings are supposed to start with
\w\d\d\d, we were just lucking out on some formatting because the
string NOVA happened to be only 4 chars long.
Add a couple of escapes so that we don't recursively fail on our
own fail self tests for comments. (boy that's fun)
Change-Id: I14d5e04cfc092b37ec4967cd7485e9975a5eb820
|
|\ |
|
| |
| |
| |
| |
| |
| | |
now that all the N402 fixes are in, start enforcing it
Change-Id: I9d495849bf698e5af142d0ccafe551ac0e8a600c
|
|/
|
|
|
|
| |
Spaces are not allowed in bash assignments.
Change-Id: Ib80b10802259f5bff2ad0489f9efd763e5995056
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We had previously been ignoring all our custom N4xx hacking.py
errors. This fixes all the N401 errors "doc strings
should not start with a space" and reduces the ignore set down
to N402 only "single line docstrings should end with period".
It also fixes the N401 parser to catch only docstrings, and
not tripple quoted string blocks used later on in a function.
Clean up a few of the more crazy uses of """ in our code
Clean up additional funky comments to make indents a bit more
consistent, and pull in lines when possible.
Change-Id: I9040a1d2ca7efda83bd5e425b95d1408b5b63577
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the default test behavior was to capture stdout and stderr.
Make the new default to not capture stdout and stderr then set
.testr.conf to always capture these streams when running tests under
testr.
The motiviation behind this change is that you will want these streams
to be captured when running under testr, but when not running under
testr you may not want to capture them. An example of this would be
running `python -m testtools.run test_name` with a change to test_name
to invoke the python debugger (capturing stdout and stderr interferes
with normal debugger functionality).
Also, only invoke the test timeout by default when running under testr.
This is done for the same reason as above. When running a test under the
debugger the timeout interferes with debugging.
Change-Id: I42cbbdadb2f221ec439e92a6800d14e8436bb77b
|
|
|
|
|
|
|
|
| |
the way the coverage exclusion was made previously meant that
if you ran coverage, it would always run all the tests. Fix
this so you can run a subset.
Change-Id: I057587204728d379e2a43b5c5ee14fe91f83f64b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert nova from using nosetests to testr for its test runner. Some
tests had to be modified to get them to run properly under testr.
run_tests.sh has been updated to run testr instead of nosetests.
Coverage is collected by running subunit.run under coverage.py when the
coverage environment is selected.
Note that you will need to rebuild your virtualenvs as nose is being
removed from the dependency lists and is being replaced by testr. Tests
will run in different processes once this test is merged so you cannot
use test classes to pass information between tests. Each test should be
a proper independent unit. Additionally the -x and -d flags to
run_tests.sh have been removed as there are currently no decent
approximations for those functions.
Change-Id: I019ca098972ca749b195f59968cf21edd5ba9109
|
|
|
|
|
|
| |
Remove obsolete lines.
Change-Id: Id6c868c857733dc4cbeceacab4d3a817b43b77b1
|
|
|
|
|
|
|
|
|
| |
When you try to debug some test using nose.tools.set_trace the pdb prompt
is 'trapped' inside tee manipulation of stdout.
Since debug mode is not supposed to be used in the gates we don't need to
concern about the lack of a log to analyze the output.
Change-Id: I7daebe7267b04d41f2ca383f826419f0dfb544ab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During Ubuntu builds we run the run_test.sh script
during the package build process, so that we can catch
regressions in our packaging before uploading to the archive.
However a recent change writes the output of the nosetests
to an error log so we don't see why the package fail to build.
This patch also displays the output of the nosetests so we
can see why the tests fail without having to look at the nosetests.log.
This patch add the '-v', for a verbose display of nosetests.
Change-Id: Id21d53df356de344a8577282c5a82f3ff927bc11
Signed-off-by: Chuck Short <chuck.short@canonical.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Some ways of running run_tests.sh will not output a line for us to
parse the count from. Treat no "Ran X tests" as "Ran 0 tests".
Change-Id: I96ba13e797ceaf9b9fa2b60ccb558510b5e32a88
|
|/
|
|
|
|
| |
pep8 E502 and E712 were temporarily disabld when upgrading to pep8 1.2
Change-Id: If5158304cb8e73ef844dea9f726df6f8fe305269
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Right now, run_tests seems to report test success if there is a
catastrophic failure early in the process. This can happen if you
have a python file that fails to parse, or if something else in
the test environment setup fails to initialize (such as creating
the empty database for the test run). Nosetests will report
success, but indicate that zero tests were run.
This patch snatches the output of nosetests and, if zero tests
ran, reports to the user that something is broken and offers a few
suggestions.
Change-Id: Ide6fd8b212f0650cb227f60b25d4b4e62ee150ac
|