Simplifying the steps between devstack install and tempest run, by
* installing tox<1.7, bacuse 1.7 is not compatible with our tox.ini
* installing and patching 'discover' when the python version is 2.6
Change-Id: I8008837d2fae6cebeeeb051b63066279ca477e01
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,16 @@ |
| 0 |
+diff -r b2efb7df637b discover.py |
|
| 1 |
+--- a/discover.py Thu Mar 24 00:31:02 2011 -0400 |
|
| 2 |
+@@ -82,7 +82,11 @@ |
|
| 3 |
+ """ |
|
| 4 |
+ testMethodPrefix = 'test' |
|
| 5 |
+ sortTestMethodsUsing = cmp |
|
| 6 |
+- suiteClass = unittest.TestSuite |
|
| 7 |
++ try: |
|
| 8 |
++ import unittest2 |
|
| 9 |
++ suiteClass = unittest2.TestSuite |
|
| 10 |
++ except ImportError: |
|
| 11 |
++ suiteClass = unittest.TestSuite |
|
| 12 |
+ _top_level_dir = None |
|
| 13 |
+ |
|
| 14 |
+ def loadTestsFromTestCase(self, testCaseClass): |
| ... | ... |
@@ -88,9 +88,6 @@ function configure_tempest {
|
| 88 | 88 |
local boto_instance_type="m1.tiny" |
| 89 | 89 |
local ssh_connect_method="fixed" |
| 90 | 90 |
|
| 91 |
- # TODO(afazekas): |
|
| 92 |
- # sudo python setup.py deploy |
|
| 93 |
- |
|
| 94 | 91 |
# Save IFS |
| 95 | 92 |
ifs=$IFS |
| 96 | 93 |
|
| ... | ... |
@@ -406,6 +403,7 @@ function create_tempest_accounts {
|
| 406 | 406 |
# install_tempest() - Collect source and prepare |
| 407 | 407 |
function install_tempest {
|
| 408 | 408 |
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH |
| 409 |
+ pip_install "tox<1.7" |
|
| 409 | 410 |
} |
| 410 | 411 |
|
| 411 | 412 |
# init_tempest() - Initialize ec2 images |
| ... | ... |
@@ -145,4 +145,11 @@ if [[ $DISTRO =~ (rhel6) ]]; then |
| 145 | 145 |
# work unmolested. |
| 146 | 146 |
sudo ln -sf /usr/bin/nosetests1.1 /usr/local/bin/nosetests |
| 147 | 147 |
|
| 148 |
+ # workaround for https://code.google.com/p/unittest-ext/issues/detail?id=79 |
|
| 149 |
+ install_package python-unittest2 patch |
|
| 150 |
+ pip_install discover |
|
| 151 |
+ (cd /usr/lib/python2.6/site-packages/; sudo patch <"$FILES/patches/unittest2-discover.patch" || echo 'Assume already applied') |
|
| 152 |
+ # Make sure the discover.pyc is up to date |
|
| 153 |
+ sudo rm /usr/lib/python2.6/site-packages/discover.pyc || true |
|
| 154 |
+ sudo python -c 'import discover' |
|
| 148 | 155 |
fi |