diff options
author | Emma Foley <emma.l.foley@intel.com> | 2017-11-29 23:02:43 +0000 |
---|---|---|
committer | Ross Brattain <ross.b.brattain@intel.com> | 2018-01-11 20:50:41 +0000 |
commit | 11802c9ec469ab570dace176c18093bc655561a2 (patch) | |
tree | 983d57a7339b2ff7d85c1960c4ba98c18ce91435 /tests/functional/utils.py | |
parent | 5702f5b5e0721d9af61e494691376f32652e0048 (diff) |
Move tests: functional/
All tests in tests/functional have been moved to yardstick/tests/functional
JIRA: YARDSTICK-837
Change-Id: I89276b36635de74dd7b8f70e961c71aa0d2c494e
Signed-off-by: Emma Foley <emma.l.foley@intel.com>
Diffstat (limited to 'tests/functional/utils.py')
-rwxr-xr-x | tests/functional/utils.py | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/tests/functional/utils.py b/tests/functional/utils.py deleted file mode 100755 index d889c0dfa..000000000 --- a/tests/functional/utils.py +++ /dev/null @@ -1,45 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Huawei Technologies Co.,Ltd and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - -import copy -import os - -from oslo_serialization import jsonutils - -from yardstick.common import process - - -class Yardstick(object): - """Create and represent separate yardstick installation. - - Usage: - yardstick = yardstick() - output = yardstick("runner list") - - """ - - def __init__(self): - self._args = ["yardstick"] - self.env = copy.deepcopy(os.environ) - - def __call__(self, cmd, getjson=False): - """Call yardstick in the shell - - :param cmd: Yardstick command. - :param getjson: If the output is a JSON object, it's deserialized. - :return Command output string. - """ - - if not isinstance(cmd, list): - cmd = cmd.split(" ") - cmd = self._args + cmd - output = process.execute(cmd=cmd) - if getjson: - return jsonutils.loads(output) - return output |