Start adding reusable test fixtures.

Now that nova is using fixtures, we have grown some that can be used across
projects. The mox/stubout fixture is a great example of this - and also can
be used in the oslo tests themselves.

Change-Id: Ia78019317a6772c5c66a875c948854248383f9ea
Use testtools as test base class.

On the path to testr migration, we need to replace the unittest base classes
with testtools.
Replace tearDown with addCleanup, addCleanup is more resilient than tearDown.
The fixtures library has excellent support for managing and cleaning
tempfiles. Use it.
Replace skip_ with testtools.skipTest

Part of blueprint grizzly-testtools.

Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
Fix up test_qpid to use BaseTestCase.

While we're in there, simplify its use of fixtures.

Part of blueprint grizzly-testtools.

Change-Id: I7ef05cc9c191aab1959a31770f905f34447e64ea
Replaced direct usage of stubout with BaseTestCase.

BaseTestCase properly hooks stubout into fixtures. Just use that.

Part of blueprint grizzly-testtools.

Change-Id: I4bf6b92b9b16d051d8c6ecaf52cf70925848ed8c
Remove the last of the nose-isms.

testtools provides a skipTest method, so there's no need to pull in nose
directly into the tests.

Part of blueprint grizzly/testtools.

Change-Id: I97a9f09a27cad0433949a96fc18001ecf69c8ba2
Replace direct use of testtools BaseTestCase.

Using the BaseTestCase across the tests in the tree lets us put in log
fixtures and consistently handle mox and stubout.

Part of blueprint grizzly-testtools.

Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
Prevent parallel test port clashes for zmq.

The scheme of incrementing port numbers did not work so well for
parallel test runs.

Part of blueprint grizzly-testtools.

Change-Id: I100e79ae79e4409691145dc721139d1a86839199
Document tools/flakes is from commons

When copying tools around it may not be clear that they came from
openstack-common.  So add a note at top of code. Had to say from
openstack-common since cannot say from oslo-incubator since word oslo is
replaced when copied.

Change-Id: I7514c88d448f13cb7b11ed1ea81a035c6a201bae
Add install_venv library.

This adds a install_venv.py library that can be used by each
project's tools/install_venv.py script.

Currently all the projects have very similar install_venv
scripts in their respective tools directories that all
accomplish the same end result. This just breaks out the
common code and puts it in a class that can be imported
and used in each project's script.

Change-Id: I8346fc4201f35e5d0c475caef893ca71e7db8236
setup: count revs for revno if there are no tags

We currently use 'git describe --always' to figure out the number of
commits there have been leading up to the HEAD commit.

However, if there are no tags in the repo, git-describe just returns
the sha hash of HEAD and we fail.

In that case, use 'git rev-list HEAD | wc -l' so we can be  #winning.

Change-Id: I345e0ee32189504276b3dfd3367057ce1d4a2b06
Merge "Document tools/flakes is from commons"
Fixes "is not", "not in" syntax usage.

Replaced "not ... is" to "is not"
Replaced "not ... in" to "not in"
Removed a redundant parenthesis

Change-Id: I9564ab1207ccdcb32d7c2bb9e8f29658b2232ff9
Merge "Start adding reusable test fixtures."
Merge "Use testtools as test base class."
Merge "Fix up test_qpid to use BaseTestCase."
Merge "Replaced direct usage of stubout with BaseTestCase."
Merge "Remove the last of the nose-isms."
Merge "Replace direct use of testtools BaseTestCase."
Merge "Prevent parallel test port clashes for zmq."
Merge "Add install_venv library."