add config files path options

This commit is contained in:
ghanshyam 2016-10-17 17:27:09 +09:00
parent 9658eed822
commit 7009882d59
3 changed files with 23 additions and 5 deletions

3
AUTHORS Normal file
View File

@ -0,0 +1,3 @@
Ghanshyam Mann <ghanshyammann@gmail.com>
ghanshyam <ghanshyam.mann@nectechnologies.in>
gmann <ghanshyam.mann@nectechnologies.in>

12
ChangeLog Normal file
View File

@ -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

View File

@ -28,6 +28,7 @@ from oslo_log import log as logging
from testtools import testsuite
from tempest import config
from tempest_stress import config as stress_cfg
from tempest_stress import driver
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.add_argument('-c', '--config-file',
metavar='/etc/tempest.conf',
help='path to tempest config file')
parser.add_argument('-c', '--config-file-path',
metavar='/etc/',
help='path to tempest and stress tests config files')
parser.add_argument('-d', '--duration', default=300, type=int,
help="Duration of test in secs")
parser.add_argument('-s', '--serial', action='store_true',
@ -99,8 +100,10 @@ group.add_argument('-t', "--tests", nargs='?',
def main():
ns = parser.parse_args()
result = 0
if ns.config_file:
config.CONF.set_config_path(ns.config_file)
if ns.config_file_path:
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:
tests = json.load(open(ns.tests, 'r'))
else: