Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Finalize tox config.

Shrink tox.ini to the new short version.
Fix the test cases to be able to be run in nosetets plus the
openstack.nose_plugin, which finally removes the need for
nova/testing/runner.py
Also, now we'll just output directly to stdout, which will
make nose collect the trace logging directly and either output
it at the end of the run, or inject it into the xunit output
appropriately.

Change-Id: I1456e18a11a840145492038108bdfe812c8230d1
  • Loading branch information...
commit cf34a6015762a82780f86004a76439e1e21340f8 1 parent 281979a
Monty Taylor authored June 03, 2012
6  .coveragerc
... ...
@@ -0,0 +1,6 @@
  1
+[run]
  2
+branch = True
  3
+omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,nova/tests/*
  4
+
  5
+[report]
  6
+ignore-errors = True
7  .gitignore
@@ -2,6 +2,7 @@
2 2
 *.DS_Store
3 3
 local_settings.py
4 4
 ChangeLog
  5
+MANIFEST
5 6
 CA/
6 7
 keeper
7 8
 instances
@@ -15,9 +16,13 @@ nova.egg-info
15 16
 *.sqlite
16 17
 *.log
17 18
 *.mo
  19
+nosetests.xml
  20
+coverage.xml
18 21
 tools/conf/nova.conf*
19 22
 cover/*
  23
+nova/tests/cover/*
  24
+nova/vcsversion.py
  25
+.autogenerated
20 26
 dist/*
21 27
 .coverage
22 28
 covhtml
23  
-nova/tests/coverage.xml
2  contrib/boto_v6/ec2/connection.py
@@ -6,7 +6,7 @@
6 6
 import boto
7 7
 import base64
8 8
 import boto.ec2
9  
-from boto_v6.ec2.instance import  ReservationV6
  9
+from boto_v6.ec2.instance import ReservationV6
10 10
 from boto.ec2.securitygroup import SecurityGroup
11 11
 
12 12
 
4  nova/log.py
@@ -361,7 +361,9 @@ def _setup_logging_from_flags():
361 361
         nova_root.addHandler(streamlog)
362 362
 
363 363
     elif not FLAGS.log_file:
364  
-        streamlog = logging.StreamHandler(stream=sys.stdout)
  364
+        # pass sys.stdout as a positional argument
  365
+        # python2.6 calls the argument strm, in 2.7 it's stream
  366
+        streamlog = logging.StreamHandler(sys.stdout)
365 367
         nova_root.addHandler(streamlog)
366 368
 
367 369
     if FLAGS.publish_errors:
6  nova/network/linux_net.py
@@ -90,7 +90,11 @@
90 90
 #             add up to 12 characters to binary_name which is used as a prefix,
91 91
 #             so we limit it to 16 characters.
92 92
 #             (max_chain_name_length - len('-POSTROUTING') == 16)
93  
-binary_name = os.path.basename(inspect.stack()[-1][1])[:16]
  93
+def get_binary_name():
  94
+    """Grab the name of the binary we're running in."""
  95
+    return os.path.basename(inspect.stack()[-1][1])[:16]
  96
+
  97
+binary_name = get_binary_name()
94 98
 
95 99
 
96 100
 class IptablesRule(object):
368  nova/testing/runner.py
... ...
@@ -1,368 +0,0 @@
1  
-#!/usr/bin/env python
2  
-# vim: tabstop=4 shiftwidth=4 softtabstop=4
3  
-
4  
-# Copyright 2010 United States Government as represented by the
5  
-# Administrator of the National Aeronautics and Space Administration.
6  
-# All Rights Reserved.
7  
-#
8  
-#    Licensed under the Apache License, Version 2.0 (the "License");
9  
-#    you may not use this file except in compliance with the License.
10  
-#    You may obtain a copy of the License at
11  
-#
12  
-#        http://www.apache.org/licenses/LICENSE-2.0
13  
-#
14  
-#    Unless required by applicable law or agreed to in writing, software
15  
-#    distributed under the License is distributed on an "AS IS" BASIS,
16  
-#    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  
-#    See the License for the specific language governing permissions and
18  
-#    limitations under the License.
19  
-
20  
-# Colorizer Code is borrowed from Twisted:
21  
-# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
22  
-#
23  
-#    Permission is hereby granted, free of charge, to any person obtaining
24  
-#    a copy of this software and associated documentation files (the
25  
-#    "Software"), to deal in the Software without restriction, including
26  
-#    without limitation the rights to use, copy, modify, merge, publish,
27  
-#    distribute, sublicense, and/or sell copies of the Software, and to
28  
-#    permit persons to whom the Software is furnished to do so, subject to
29  
-#    the following conditions:
30  
-#
31  
-#    The above copyright notice and this permission notice shall be
32  
-#    included in all copies or substantial portions of the Software.
33  
-#
34  
-#    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
35  
-#    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
36  
-#    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
37  
-#    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
38  
-#    LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
39  
-#    OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
40  
-#    WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41  
-"""Unittest runner for Nova.
42  
-
43  
-To run all tests
44  
-    python nova/testing/runner.py
45  
-
46  
-To run a single test module:
47  
-    python nova/testing/runner.py test_compute
48  
-
49  
-    or
50  
-
51  
-    python nova/testing/runner.py api.test_wsgi
52  
-
53  
-To run a single test:
54  
-    python nova/testing/runner.py
55  
-        test_compute:ComputeTestCase.test_run_terminate
56  
-
57  
-"""
58  
-
59  
-import gettext
60  
-import heapq
61  
-import os
62  
-import sys
63  
-import time
64  
-import unittest
65  
-
66  
-import eventlet
67  
-from nose import config
68  
-from nose import core
69  
-from nose import result
70  
-
71  
-gettext.install('nova', unicode=1)
72  
-reldir = os.path.join(os.path.dirname(__file__), '..', '..')
73  
-absdir = os.path.abspath(reldir)
74  
-sys.path.insert(0, absdir)
75  
-
76  
-from nova import log as logging
77  
-
78  
-
79  
-class _AnsiColorizer(object):
80  
-    """
81  
-    A colorizer is an object that loosely wraps around a stream, allowing
82  
-    callers to write text to the stream in a particular color.
83  
-
84  
-    Colorizer classes must implement C{supported()} and C{write(text, color)}.
85  
-    """
86  
-    _colors = dict(black=30, red=31, green=32, yellow=33,
87  
-                   blue=34, magenta=35, cyan=36, white=37)
88  
-
89  
-    def __init__(self, stream):
90  
-        self.stream = stream
91  
-
92  
-    def supported(cls, stream=sys.stdout):
93  
-        """
94  
-        A class method that returns True if the current platform supports
95  
-        coloring terminal output using this method. Returns False otherwise.
96  
-        """
97  
-        if not stream.isatty():
98  
-            return False  # auto color only on TTYs
99  
-        try:
100  
-            import curses
101  
-        except ImportError:
102  
-            return False
103  
-        else:
104  
-            try:
105  
-                try:
106  
-                    return curses.tigetnum("colors") > 2
107  
-                except curses.error:
108  
-                    curses.setupterm()
109  
-                    return curses.tigetnum("colors") > 2
110  
-            except Exception:
111  
-                return False
112  
-    supported = classmethod(supported)
113  
-
114  
-    def write(self, text, color):
115  
-        """
116  
-        Write the given text to the stream in the given color.
117  
-
118  
-        @param text: Text to be written to the stream.
119  
-
120  
-        @param color: A string label for a color. e.g. 'red', 'white'.
121  
-        """
122  
-        color = self._colors[color]
123  
-        self.stream.write('\x1b[%s;1m%s\x1b[0m' % (color, text))
124  
-
125  
-
126  
-class _Win32Colorizer(object):
127  
-    """
128  
-    See _AnsiColorizer docstring.
129  
-    """
130  
-    def __init__(self, stream):
131  
-        import win32console as win
132  
-        red, green, blue, bold = (win.FOREGROUND_RED, win.FOREGROUND_GREEN,
133  
-                                 win.FOREGROUND_BLUE, win.FOREGROUND_INTENSITY)
134  
-        self.stream = stream
135  
-        self.screenBuffer = win.GetStdHandle(win.STD_OUT_HANDLE)
136  
-        self._colors = {
137  
-            'normal': red | green | blue,
138  
-            'red': red | bold,
139  
-            'green': green | bold,
140  
-            'blue': blue | bold,
141  
-            'yellow': red | green | bold,
142  
-            'magenta': red | blue | bold,
143  
-            'cyan': green | blue | bold,
144  
-            'white': red | green | blue | bold
145  
-            }
146  
-
147  
-    def supported(cls, stream=sys.stdout):
148  
-        try:
149  
-            import win32console
150  
-            screenBuffer = win32console.GetStdHandle(
151  
-                win32console.STD_OUT_HANDLE)
152  
-        except ImportError:
153  
-            return False
154  
-        import pywintypes
155  
-        try:
156  
-            screenBuffer.SetConsoleTextAttribute(
157  
-                win32console.FOREGROUND_RED |
158  
-                win32console.FOREGROUND_GREEN |
159  
-                win32console.FOREGROUND_BLUE)
160  
-        except pywintypes.error:
161  
-            return False
162  
-        else:
163  
-            return True
164  
-    supported = classmethod(supported)
165  
-
166  
-    def write(self, text, color):
167  
-        color = self._colors[color]
168  
-        self.screenBuffer.SetConsoleTextAttribute(color)
169  
-        self.stream.write(text)
170  
-        self.screenBuffer.SetConsoleTextAttribute(self._colors['normal'])
171  
-
172  
-
173  
-class _NullColorizer(object):
174  
-    """
175  
-    See _AnsiColorizer docstring.
176  
-    """
177  
-    def __init__(self, stream):
178  
-        self.stream = stream
179  
-
180  
-    def supported(cls, stream=sys.stdout):
181  
-        return True
182  
-    supported = classmethod(supported)
183  
-
184  
-    def write(self, text, color):
185  
-        self.stream.write(text)
186  
-
187  
-
188  
-def get_elapsed_time_color(elapsed_time):
189  
-    if elapsed_time > 1.0:
190  
-        return 'red'
191  
-    elif elapsed_time > 0.25:
192  
-        return 'yellow'
193  
-    else:
194  
-        return 'green'
195  
-
196  
-
197  
-class NovaTestResult(result.TextTestResult):
198  
-    def __init__(self, *args, **kw):
199  
-        self.show_elapsed = kw.pop('show_elapsed')
200  
-        result.TextTestResult.__init__(self, *args, **kw)
201  
-        self.num_slow_tests = 5
202  
-        self.slow_tests = []  # this is a fixed-sized heap
203  
-        self._last_case = None
204  
-        self.colorizer = None
205  
-        # NOTE(vish): reset stdout for the terminal check
206  
-        stdout = sys.stdout
207  
-        sys.stdout = sys.__stdout__
208  
-        for colorizer in [_Win32Colorizer, _AnsiColorizer, _NullColorizer]:
209  
-            if colorizer.supported():
210  
-                self.colorizer = colorizer(self.stream)
211  
-                break
212  
-        sys.stdout = stdout
213  
-
214  
-        # NOTE(lorinh): Initialize start_time in case a sqlalchemy-migrate
215  
-        # error results in it failing to be initialized later. Otherwise,
216  
-        # _handleElapsedTime will fail, causing the wrong error message to
217  
-        # be outputted.
218  
-        self.start_time = time.time()
219  
-
220  
-    def getDescription(self, test):
221  
-        return str(test)
222  
-
223  
-    def _handleElapsedTime(self, test):
224  
-        self.elapsed_time = time.time() - self.start_time
225  
-        item = (self.elapsed_time, test)
226  
-        # Record only the n-slowest tests using heap
227  
-        if len(self.slow_tests) >= self.num_slow_tests:
228  
-            heapq.heappushpop(self.slow_tests, item)
229  
-        else:
230  
-            heapq.heappush(self.slow_tests, item)
231  
-
232  
-    def _writeElapsedTime(self, test):
233  
-        color = get_elapsed_time_color(self.elapsed_time)
234  
-        self.colorizer.write("  %.2f" % self.elapsed_time, color)
235  
-
236  
-    def _writeResult(self, test, long_result, color, short_result, success):
237  
-        if self.showAll:
238  
-            self.colorizer.write(long_result, color)
239  
-            if self.show_elapsed and success:
240  
-                self._writeElapsedTime(test)
241  
-            self.stream.writeln()
242  
-        elif self.dots:
243  
-            self.stream.write(short_result)
244  
-            self.stream.flush()
245  
-
246  
-    # NOTE(vish): copied from unittest with edit to add color
247  
-    def addSuccess(self, test):
248  
-        unittest.TestResult.addSuccess(self, test)
249  
-        self._handleElapsedTime(test)
250  
-        self._writeResult(test, 'OK', 'green', '.', True)
251  
-
252  
-    # NOTE(vish): copied from unittest with edit to add color
253  
-    def addFailure(self, test, err):
254  
-        unittest.TestResult.addFailure(self, test, err)
255  
-        self._handleElapsedTime(test)
256  
-        self._writeResult(test, 'FAIL', 'red', 'F', False)
257  
-
258  
-    # NOTE(vish): copied from nose with edit to add color
259  
-    def addError(self, test, err):
260  
-        """Overrides normal addError to add support for
261  
-        errorClasses. If the exception is a registered class, the
262  
-        error will be added to the list for that class, not errors.
263  
-        """
264  
-        self._handleElapsedTime(test)
265  
-        stream = getattr(self, 'stream', None)
266  
-        ec, ev, tb = err
267  
-        try:
268  
-            exc_info = self._exc_info_to_string(err, test)
269  
-        except TypeError:
270  
-            # 2.3 compat
271  
-            exc_info = self._exc_info_to_string(err)
272  
-        for cls, (storage, label, isfail) in self.errorClasses.items():
273  
-            if result.isclass(ec) and issubclass(ec, cls):
274  
-                if isfail:
275  
-                    test.passed = False
276  
-                storage.append((test, exc_info))
277  
-                # Might get patched into a streamless result
278  
-                if stream is not None:
279  
-                    if self.showAll:
280  
-                        message = [label]
281  
-                        detail = result._exception_detail(err[1])
282  
-                        if detail:
283  
-                            message.append(detail)
284  
-                        stream.writeln(": ".join(message))
285  
-                    elif self.dots:
286  
-                        stream.write(label[:1])
287  
-                return
288  
-        self.errors.append((test, exc_info))
289  
-        test.passed = False
290  
-        if stream is not None:
291  
-            self._writeResult(test, 'ERROR', 'red', 'E', False)
292  
-
293  
-    def startTest(self, test):
294  
-        unittest.TestResult.startTest(self, test)
295  
-        self.start_time = time.time()
296  
-        current_case = test.test.__class__.__name__
297  
-
298  
-        if self.showAll:
299  
-            if current_case != self._last_case:
300  
-                self.stream.writeln(current_case)
301  
-                self._last_case = current_case
302  
-
303  
-            self.stream.write(
304  
-                '    %s' % str(test.test._testMethodName).ljust(60))
305  
-            self.stream.flush()
306  
-
307  
-
308  
-class NovaTestRunner(core.TextTestRunner):
309  
-    def __init__(self, *args, **kwargs):
310  
-        self.show_elapsed = kwargs.pop('show_elapsed')
311  
-        core.TextTestRunner.__init__(self, *args, **kwargs)
312  
-
313  
-    def _makeResult(self):
314  
-        return NovaTestResult(self.stream,
315  
-                              self.descriptions,
316  
-                              self.verbosity,
317  
-                              self.config,
318  
-                              show_elapsed=self.show_elapsed)
319  
-
320  
-    def _writeSlowTests(self, result_):
321  
-        # Pare out 'fast' tests
322  
-        slow_tests = [item for item in result_.slow_tests
323  
-                      if get_elapsed_time_color(item[0]) != 'green']
324  
-        if slow_tests:
325  
-            slow_total_time = sum(item[0] for item in slow_tests)
326  
-            self.stream.writeln("Slowest %i tests took %.2f secs:"
327  
-                                % (len(slow_tests), slow_total_time))
328  
-            for elapsed_time, test in sorted(slow_tests, reverse=True):
329  
-                time_str = "%.2f" % elapsed_time
330  
-                self.stream.writeln("    %s %s" % (time_str.ljust(10), test))
331  
-
332  
-    def run(self, test):
333  
-        result_ = core.TextTestRunner.run(self, test)
334  
-        if self.show_elapsed:
335  
-            self._writeSlowTests(result_)
336  
-        return result_
337  
-
338  
-
339  
-def run():
340  
-    # This is a fix to allow the --hide-elapsed flag while accepting
341  
-    # arbitrary nosetest flags as well
342  
-    argv = [x for x in sys.argv if x != '--hide-elapsed']
343  
-    hide_elapsed = argv != sys.argv
344  
-    logging.setup()
345  
-
346  
-    # If any argument looks like a test name but doesn't have "nova.tests" in
347  
-    # front of it, automatically add that so we don't have to type as much
348  
-    for i, arg in enumerate(argv):
349  
-        if arg.startswith('test_'):
350  
-            argv[i] = 'nova.tests.%s' % arg
351  
-
352  
-    testdir = os.path.abspath(os.path.join("nova", "tests"))
353  
-    c = config.Config(stream=sys.stdout,
354  
-                      env=os.environ,
355  
-                      verbosity=3,
356  
-                      workingDir=testdir,
357  
-                      plugins=core.DefaultPluginManager())
358  
-
359  
-    runner = NovaTestRunner(stream=c.stream,
360  
-                            verbosity=c.verbosity,
361  
-                            config=c,
362  
-                            show_elapsed=not hide_elapsed)
363  
-    sys.exit(not core.run(config=c, testRunner=runner, argv=argv))
364  
-
365  
-
366  
-if __name__ == '__main__':
367  
-    eventlet.monkey_patch()
368  
-    run()
8  nova/tests/__init__.py
@@ -39,8 +39,16 @@
39 39
 
40 40
 from nova.db.sqlalchemy.session import get_engine
41 41
 from nova import flags
  42
+from nova import log as logging
  43
+
  44
+import eventlet
  45
+
  46
+eventlet.monkey_patch()
42 47
 
43 48
 FLAGS = flags.FLAGS
  49
+FLAGS.use_stderr = False
  50
+
  51
+logging.setup()
44 52
 
45 53
 _DB = None
46 54
 
22  nova/tests/test_iptables_network.py
@@ -22,6 +22,9 @@
22 22
 
23 23
 
24 24
 class IptablesManagerTestCase(test.TestCase):
  25
+
  26
+    binary_name = linux_net.get_binary_name()
  27
+
25 28
     sample_filter = ['#Generated by iptables-save on Fri Feb 18 15:17:05 2011',
26 29
                      '*filter',
27 30
                      ':INPUT ACCEPT [2223527:305688874]',
@@ -82,13 +85,14 @@ def test_filter_rules_are_wrapped(self):
82 85
         table = self.manager.ipv4['filter']
83 86
         table.add_rule('FORWARD', '-s 1.2.3.4/5 -j DROP')
84 87
         new_lines = self.manager._modify_rules(current_lines, table)
85  
-        self.assertTrue('-A runner.py-FORWARD '
86  
-                        '-s 1.2.3.4/5 -j DROP' in new_lines)
  88
+        self.assertTrue('-A %s-FORWARD '
  89
+                        '-s 1.2.3.4/5 -j DROP' % self.binary_name in new_lines)
87 90
 
88 91
         table.remove_rule('FORWARD', '-s 1.2.3.4/5 -j DROP')
89 92
         new_lines = self.manager._modify_rules(current_lines, table)
90  
-        self.assertTrue('-A runner.py-FORWARD '
91  
-                        '-s 1.2.3.4/5 -j DROP' not in new_lines)
  93
+        self.assertTrue('-A %s-FORWARD '
  94
+                        '-s 1.2.3.4/5 -j DROP' % self.binary_name \
  95
+                        not in new_lines)
92 96
 
93 97
     def test_nat_rules(self):
94 98
         current_lines = self.sample_nat
@@ -121,8 +125,8 @@ def test_nat_rules(self):
121 125
                         "nova-postouting-bottom: %s" % last_postrouting_line)
122 126
 
123 127
         for chain in ['POSTROUTING', 'PREROUTING', 'OUTPUT']:
124  
-            self.assertTrue('-A %s -j runner.py-%s' %
125  
-                            (chain, chain) in new_lines,
  128
+            self.assertTrue('-A %s -j %s-%s' %
  129
+                            (chain, self.binary_name, chain) in new_lines,
126 130
                             "Built-in chain %s not wrapped" % (chain,))
127 131
 
128 132
     def test_filter_rules(self):
@@ -153,10 +157,10 @@ def test_filter_rules(self):
153 157
                     break
154 158
 
155 159
         self.assertTrue('-A nova-filter-top '
156  
-                        '-j runner.py-local' in new_lines,
  160
+                        '-j %s-local' % self.binary_name in new_lines,
157 161
                         "nova-filter-top does not jump to wrapped local chain")
158 162
 
159 163
         for chain in ['INPUT', 'OUTPUT', 'FORWARD']:
160  
-            self.assertTrue('-A %s -j runner.py-%s' %
161  
-                            (chain, chain) in new_lines,
  164
+            self.assertTrue('-A %s -j %s-%s' %
  165
+                            (chain, self.binary_name, chain) in new_lines,
162 166
                             "Built-in chain %s not wrapped" % (chain,))
11  run_tests.sh
@@ -60,6 +60,13 @@ coverage=0
60 60
 recreate_db=1
61 61
 patch_migrate=1
62 62
 
  63
+export NOSE_WITH_OPENSTACK=1
  64
+export NOSE_OPENSTACK_COLOR=1
  65
+export NOSE_OPENSTACK_RED=0.05
  66
+export NOSE_OPENSTACK_YELLOW=0.025
  67
+export NOSE_OPENSTACK_SHOW_ELAPSED=1
  68
+export NOSE_OPENSTACK_STDOUT=1
  69
+
63 70
 for arg in "$@"; do
64 71
   process_option $arg
65 72
 done
@@ -77,7 +84,7 @@ function run_tests {
77 84
   # Cleanup *pyc
78 85
   ${wrapper} find . -type f -name "*.pyc" -delete
79 86
   # Just run the test suites in current environment
80  
-  ${wrapper} $NOSETESTS 2> run_tests.log
  87
+  ${wrapper} $NOSETESTS
81 88
   # If we get some short import error right away, print the error log directly
82 89
   RESULT=$?
83 90
   if [ "$RESULT" -ne "0" ];
@@ -115,7 +122,7 @@ function run_pep8 {
115 122
 }
116 123
 
117 124
 
118  
-NOSETESTS="python nova/testing/runner.py $noseopts $noseargs"
  125
+NOSETESTS="nosetests $noseopts $noseargs"
119 126
 
120 127
 if [ $never_venv -eq 0 ]
121 128
 then
9  setup.cfg
@@ -25,8 +25,7 @@ output_file = nova/locale/nova.pot
25 25
 [nosetests]
26 26
 verbosity=2
27 27
 detailed-errors=1
28  
-with-openstack=1
29  
-openstack-red=0.05
30  
-openstack-yellow=0.025
31  
-openstack-show-elapsed=1
32  
-openstack-color=1
  28
+cover-package = nova
  29
+cover-html = true
  30
+cover-erase = true
  31
+where=nova/tests
3  tools/test-requires
@@ -4,8 +4,7 @@ distribute>=0.6.24
4 4
 coverage
5 5
 mox==0.5.3
6 6
 nose
7  
-nosexcover
8  
-openstack.nose_plugin
  7
+openstack.nose_plugin>=0.7
9 8
 pep8==1.1
10 9
 sphinx>=1.1.2
11 10
 MySQL-python
28  tox.ini
@@ -3,9 +3,15 @@ envlist = py26,py27,pep8
3 3
 
4 4
 [testenv]
5 5
 setenv = VIRTUAL_ENV={envdir}
  6
+         NOSE_WITH_OPENSTACK=1
  7
+         NOSE_OPENSTACK_COLOR=1
  8
+         NOSE_OPENSTACK_RED=0.05
  9
+         NOSE_OPENSTACK_YELLOW=0.025
  10
+         NOSE_OPENSTACK_SHOW_ELAPSED=1
  11
+         NOSE_OPENSTACK_STDOUT=1
6 12
 deps = -r{toxinidir}/tools/pip-requires
7 13
        -r{toxinidir}/tools/test-requires
8  
-commands = /bin/bash run_tests.sh -N -P
  14
+commands = nosetests {posargs}
9 15
 
10 16
 [tox:jenkins]
11 17
 sitepackages = True
@@ -13,26 +19,10 @@ downloadcache = ~/cache/pip
13 19
 
14 20
 [testenv:pep8]
15 21
 deps = pep8==1.1
16  
-commands = /bin/bash run_tests.sh -N --pep8
  22
+commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc .
17 23
 
18 24
 [testenv:cover]
19  
-commands = /bin/bash run_tests.sh -N -P --cover-package=nova --cover-erase --with-xcoverage
  25
+setenv = NOSE_WITH_COVERAGE=1
20 26
 
21 27
 [testenv:venv]
22 28
 commands = {posargs}
23  
-
24  
-[testenv:jenkins26]
25  
-basepython = python2.6
26  
-deps = file://{toxinidir}/.cache.bundle
27  
-
28  
-[testenv:jenkins27]
29  
-basepython = python2.7
30  
-deps = file://{toxinidir}/.cache.bundle
31  
-
32  
-[testenv:jenkinscover]
33  
-commands = /bin/bash run_tests.sh -N -P --cover-package=nova --cover-erase --with-xcoverage
34  
-
35  
-[testenv:jenkinsvenv]
36  
-deps = file://{toxinidir}/.cache.bundle
37  
-commands = {posargs}
38  
-

Git Notes

review

Verified+2: Jenkins
Approved+1: Vish Ishaya <vishvananda@gmail.com>
Code-Review+2: Vish Ishaya <vishvananda@gmail.com>
Code-Review+2: Brian Waldon <brian.waldon@rackspace.com>
Verified+1: SmokeStack
Submitted-by: Jenkins
Submitted-at: Thu, 07 Jun 2012 18:13:13 +0000
Reviewed-on: https://review.openstack.org/8106
Project: openstack/nova
Branch: refs/heads/master

0 notes on commit cf34a60

Please sign in to comment.
Something went wrong with that request. Please try again.