Add option for stateless tests disabling

This commit is contained in:
alesapin 2019-01-18 14:47:50 +03:00
parent 78671d15bd
commit a5af465b20

View File

@ -132,6 +132,9 @@ def main(args):
if 'stateful' in suite and not is_data_present():
print("Won't run stateful tests because test data wasn't loaded.")
continue
if 'stateless' in suite and args.no_stateless:
print("Won't run stateless tests because they were manually disabled.")
continue
# Reverse sort order: we want run newest test first.
# And not reverse subtests
@ -343,6 +346,7 @@ if __name__ == '__main__':
parser.add_argument('--order', default = 'desc', help = 'Run order (asc, desc, random)')
parser.add_argument('--testname', action = 'store_true', default = None, dest = 'testname', help = 'Make query with test name before test run')
parser.add_argument('--no-stateless', action = 'store_true', help = 'Disable all stateless tests')
parser.add_argument('--skip', nargs='+', help = "Skip these tests")
parser.add_argument('--no-long', action = 'store_false', dest = 'no_long', help = 'Do not run long tests')
group = parser.add_mutually_exclusive_group(required = False)