add config files path options
This commit is contained in:
parent
9658eed822
commit
7009882d59
|
@ -0,0 +1,3 @@
|
||||||
|
Ghanshyam Mann <ghanshyammann@gmail.com>
|
||||||
|
ghanshyam <ghanshyam.mann@nectechnologies.in>
|
||||||
|
gmann <ghanshyam.mann@nectechnologies.in>
|
|
@ -0,0 +1,12 @@
|
||||||
|
CHANGES
|
||||||
|
=======
|
||||||
|
|
||||||
|
* Fix config.py
|
||||||
|
* Update README.rst
|
||||||
|
* Update README.rst
|
||||||
|
* Fix config optins registration
|
||||||
|
* Fix more import
|
||||||
|
* Update requirements.txt
|
||||||
|
* Fix import modules
|
||||||
|
* Initial commit for stress framework from tempest
|
||||||
|
* Initial commit
|
|
@ -28,6 +28,7 @@ from oslo_log import log as logging
|
||||||
from testtools import testsuite
|
from testtools import testsuite
|
||||||
from tempest import config
|
from tempest import config
|
||||||
|
|
||||||
|
from tempest_stress import config as stress_cfg
|
||||||
from tempest_stress import driver
|
from tempest_stress import driver
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
@ -73,9 +74,9 @@ def discover_stress_tests(path="./", filter_attr=None, call_inherited=False):
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(description='Run stress tests')
|
parser = argparse.ArgumentParser(description='Run stress tests')
|
||||||
parser.add_argument('-c', '--config-file',
|
parser.add_argument('-c', '--config-file-path',
|
||||||
metavar='/etc/tempest.conf',
|
metavar='/etc/',
|
||||||
help='path to tempest config file')
|
help='path to tempest and stress tests config files')
|
||||||
parser.add_argument('-d', '--duration', default=300, type=int,
|
parser.add_argument('-d', '--duration', default=300, type=int,
|
||||||
help="Duration of test in secs")
|
help="Duration of test in secs")
|
||||||
parser.add_argument('-s', '--serial', action='store_true',
|
parser.add_argument('-s', '--serial', action='store_true',
|
||||||
|
@ -99,8 +100,10 @@ group.add_argument('-t', "--tests", nargs='?',
|
||||||
def main():
|
def main():
|
||||||
ns = parser.parse_args()
|
ns = parser.parse_args()
|
||||||
result = 0
|
result = 0
|
||||||
if ns.config_file:
|
if ns.config_file_path:
|
||||||
config.CONF.set_config_path(ns.config_file)
|
tempest_config = ns.config_file_path + "/tempest.conf"
|
||||||
|
config.CONF.set_config_path(tempest_config)
|
||||||
|
stress_cfg.CONF.set_config_path(ns.config_file_path)
|
||||||
if not ns.all:
|
if not ns.all:
|
||||||
tests = json.load(open(ns.tests, 'r'))
|
tests = json.load(open(ns.tests, 'r'))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue