Merge "Add Python 3.4 as supported interpreters"
This commit is contained in:
commit
6b4da5dae1
@ -37,3 +37,7 @@ requests>=2.2.0,!=2.4.0
|
||||
SQLAlchemy>=0.9.7,<=0.9.99
|
||||
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
|
||||
six>=1.9.0
|
||||
|
||||
# Python 2.6 related packages(see rally.common.costilius for more details)
|
||||
ordereddict
|
||||
simplejson>=2.2.0
|
||||
|
@ -17,6 +17,8 @@ classifier =
|
||||
Programming Language :: Python :: 2
|
||||
Programming Language :: Python :: 2.6
|
||||
Programming Language :: Python :: 2.7
|
||||
Programming Language :: Python :: 3
|
||||
Programming Language :: Python :: 3.4
|
||||
|
||||
[files]
|
||||
packages =
|
||||
|
@ -535,11 +535,11 @@ class SLATestCase(unittest.TestCase):
|
||||
rally("task sla_check")
|
||||
expected = [
|
||||
{"benchmark": "KeystoneBasic.create_and_list_users",
|
||||
"criterion": "max_seconds_per_iteration",
|
||||
"criterion": "failure_rate",
|
||||
"detail": mock.ANY,
|
||||
"pos": 0, "status": "PASS"},
|
||||
{"benchmark": "KeystoneBasic.create_and_list_users",
|
||||
"criterion": "failure_rate",
|
||||
"criterion": "max_seconds_per_iteration",
|
||||
"detail": mock.ANY,
|
||||
"pos": 0, "status": "PASS"}
|
||||
]
|
||||
|
@ -13,6 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from oslo_utils import encodeutils
|
||||
from six.moves import configparser
|
||||
|
||||
import inspect
|
||||
@ -37,7 +38,7 @@ class RallyCmdError(Exception):
|
||||
|
||||
def __init__(self, code, output):
|
||||
self.code = code
|
||||
self.output = output
|
||||
self.output = encodeutils.safe_decode(output)
|
||||
|
||||
def __str__(self):
|
||||
return "Code: %d Output: %s\n" % (self.code, self.output)
|
||||
@ -50,7 +51,7 @@ class TaskConfig(object):
|
||||
|
||||
def __init__(self, config):
|
||||
config_file = tempfile.NamedTemporaryFile(delete=False)
|
||||
config_file.write(json.dumps(config).encode("utf-8"))
|
||||
config_file.write(encodeutils.safe_encode(json.dumps(config)))
|
||||
config_file.close()
|
||||
self.filename = config_file.name
|
||||
|
||||
@ -159,7 +160,7 @@ class Rally(object):
|
||||
:param getjson: in cases, when rally prints JSON, you can catch output
|
||||
deserialized
|
||||
:param report_path: if present, rally command and its output will be
|
||||
wretten to file with passed file name
|
||||
written to file with passed file name
|
||||
:param raw: don't write command itself to report file. Only output
|
||||
will be written
|
||||
"""
|
||||
@ -167,8 +168,8 @@ class Rally(object):
|
||||
if not isinstance(cmd, list):
|
||||
cmd = cmd.split(" ")
|
||||
try:
|
||||
output = subprocess.check_output(self.args + cmd,
|
||||
stderr=subprocess.STDOUT)
|
||||
output = encodeutils.safe_decode(subprocess.check_output(
|
||||
self.args + cmd, stderr=subprocess.STDOUT))
|
||||
|
||||
if write_report:
|
||||
if not report_path:
|
||||
@ -181,6 +182,6 @@ class Rally(object):
|
||||
|
||||
if getjson:
|
||||
return json.loads(output)
|
||||
return output.decode("utf-8")
|
||||
return output
|
||||
except subprocess.CalledProcessError as e:
|
||||
raise RallyCmdError(e.returncode, e.output)
|
||||
|
Loading…
Reference in New Issue
Block a user