Browse Source

add config files path options

changes/61/543161/1
ghanshyam 5 years ago
parent
commit
7009882d59
3 changed files with 23 additions and 5 deletions
  1. +3
    -0
      AUTHORS
  2. +12
    -0
      ChangeLog
  3. +8
    -5
      tempest_stress/cmd/run_stress.py

+ 3
- 0
AUTHORS View File

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

+ 12
- 0
ChangeLog 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

+ 8
- 5
tempest_stress/cmd/run_stress.py 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:


Loading…
Cancel
Save