2dc5d9f863
This removes the run_tests.sh script, replacing it with documentation on how to use tox itself for testing nova things, as well as links to learn more about both that, and how to not use tox at all if you really care. Why should we do this? New people coming to the project see a file called run_tests.sh and use it, because why would you have a file like that in the top of your directory if that wasn't what you were supposed to use. However it's not what we want anyone using for upstream contributions. One of the critical differences between it and tox is that it lacks ``python hashseed randomization``. This runs every test run with a different forced hashseed, that exposes bugs in tests early. Test contributors need to be running that on their tests before submission to shake out these errors early. In addition, because we have multiple ways in tree to run tests, helping people debug their test failures means we have to start at a step -1 of "how are you running tests". This adds load for helping new folks. What about people that want to run tests with specific system or virtual env python setups for pre deployment testing? Good news! Our tests comply to python standard testing interfaces, so are runnable by any test runner (we recommend ``testr`` because that's what tox calls under the covers). You can just run ``testr run`` at the top level from your virtuenv or system of choice. And life is good. The constraints we need / want for inbound tests don't apply in these cases. This removes a bit of confusion for new contributors, ensures that new test contributions receive correct local testing before they are run in our gate, and only require a very minor change in behavior for downstream test environments. Change-Id: I05d85a15c0db2a573abb82cb2f7dc3eeaeac0b41
43 lines
755 B
Bash
Executable File
43 lines
755 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
cat <<EOF
|
|
run_tests.sh is deprecated and this script will be removed
|
|
before the Mitaka release. All tests should be run through
|
|
tox.
|
|
|
|
To run style checks:
|
|
|
|
tox -e pep8
|
|
|
|
To run python 2.7 unit tests
|
|
|
|
tox -e py27
|
|
|
|
To run functional tests
|
|
|
|
tox -e functional
|
|
|
|
To run a subset of any of these tests:
|
|
|
|
tox -e py27 someregex
|
|
|
|
i.e.: tox -e py27 test_servers
|
|
|
|
Additional tox targets are available in tox.ini. For more information
|
|
see:
|
|
http://docs.openstack.org/infra/manual/python.html#running-python-unit-tests
|
|
|
|
NOTE: if you really really don't want to use tox to run tests, you
|
|
can instead use:
|
|
|
|
testr run
|
|
|
|
Documentation on using testr directly can be found at
|
|
http://testrepository.readthedocs.org/en/latest/MANUAL.html
|
|
|
|
EOF
|
|
|
|
exit 1
|