Add concurrency support in new integration tests

Add support of parallel running tests.
Testr provide ability to setting number of processes for running tests.
By default concurrency = <num_of_cores_in_cpu>

partially implements bp: scenario-integration-tests

Change-Id: Iebe570382e463b485fbcb57608c3d6d82690e098
This commit is contained in:
Sergey Reshetnyak 2015-01-29 18:49:14 +03:00
parent bc911a3acb
commit 720a87ff60
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,5 @@
concurrency: 1
credentials:
os_username: admin
os_password: nova

View File

@ -92,8 +92,12 @@ def main():
path=test_dir_path)
# run tests
concurrency = config.get('concurrency')
os.environ['DISCOVER_DIRECTORY'] = test_dir_path
return_code = os.system('bash tools/pretty_tox.sh')
command = 'bash tools/pretty_tox.sh'
if concurrency:
command = command + ' -- --concurrency %d' % concurrency
return_code = os.system(command)
sys.exit(return_code)