#
import argparse
+import datetime
import os
import re
import sys
def run_test(test):
+ start = datetime.datetime.now()
test_name = test.get_name()
logger.info("\n") # blank line
print_separator("=")
if CLEAN_FLAG:
cleanup()
+ end = datetime.datetime.now()
+ duration = (end - start).seconds
+ str = ("%02d:%02d" % divmod(duration, 60))
+ logger.info("Test execution time: %s" % str)
def run_tier(tier):
@testcase.command('run', help="Executes a test case.")
@click.argument('testname', type=click.STRING, required=True)
-@click.option('-n', '--noclean', is_flag=True, default=False,
+@click.option('-n', '--noclean', is_flag=True, default=False,
help='The created openstack resources by the test'
'will not be cleaned after the execution.')
def testcase_run(testname, noclean):
@tier.command('run', help="Executes all the tests within a tier.")
@click.argument('tiername', type=click.STRING, required=True)
-@click.option('-n', '--noclean', is_flag=True, default=False,
+@click.option('-n', '--noclean', is_flag=True, default=False,
help='The created openstack resources by the tests'
'will not be cleaned after the execution.')
def tier_run(tiername, noclean):