Skip to content

Commit

Permalink
Finalize tox config.
Browse files Browse the repository at this point in the history
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
emonty committed Jun 7, 2012
1 parent 281979a commit cf34a60
Show file tree
Hide file tree
Showing 12 changed files with 65 additions and 409 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,nova/tests/*

[report]
ignore-errors = True
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.DS_Store
local_settings.py
ChangeLog
MANIFEST
CA/
keeper
instances
Expand All @@ -15,9 +16,13 @@ nova.egg-info
*.sqlite
*.log
*.mo
nosetests.xml
coverage.xml
tools/conf/nova.conf*
cover/*
nova/tests/cover/*
nova/vcsversion.py
.autogenerated
dist/*
.coverage
covhtml
nova/tests/coverage.xml
2 changes: 1 addition & 1 deletion contrib/boto_v6/ec2/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import boto
import base64
import boto.ec2
from boto_v6.ec2.instance import ReservationV6
from boto_v6.ec2.instance import ReservationV6
from boto.ec2.securitygroup import SecurityGroup


Expand Down
4 changes: 3 additions & 1 deletion nova/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ def _setup_logging_from_flags():
nova_root.addHandler(streamlog)

elif not FLAGS.log_file:
streamlog = logging.StreamHandler(stream=sys.stdout)
# pass sys.stdout as a positional argument
# python2.6 calls the argument strm, in 2.7 it's stream
streamlog = logging.StreamHandler(sys.stdout)
nova_root.addHandler(streamlog)

if FLAGS.publish_errors:
Expand Down
6 changes: 5 additions & 1 deletion nova/network/linux_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@
# add up to 12 characters to binary_name which is used as a prefix,
# so we limit it to 16 characters.
# (max_chain_name_length - len('-POSTROUTING') == 16)
binary_name = os.path.basename(inspect.stack()[-1][1])[:16]
def get_binary_name():
"""Grab the name of the binary we're running in."""
return os.path.basename(inspect.stack()[-1][1])[:16]

binary_name = get_binary_name()


class IptablesRule(object):
Expand Down
Loading

0 comments on commit cf34a60

Please sign in to comment.