Lines Matching +full:test +full:- +full:path
5 # Copyright (c) 2020-2021 Virtuozzo International GmbH
23 from pathlib import Path
31 Try to automagically figure out the path we are running from.
34 if os.path.islink(sys.argv[0]):
36 return os.path.dirname(os.readlink(sys.argv[0]))
38 return os.path.dirname(os.path.abspath(sys.argv[0]))
42 def make_argparser() -> argparse.ArgumentParser:
44 description="Test run options",
47 p.add_argument('-n', '--dry-run', action='store_true',
49 p.add_argument('-j', dest='jobs', type=int, default=1,
52 p.add_argument('-d', dest='debug', action='store_true', help='debug')
53 p.add_argument('-p', dest='print', action='store_true',
55 'the test output')
56 p.add_argument('-gdb', action='store_true',
59 p.add_argument('-valgrind', action='store_true',
63 p.add_argument('-misalign', action='store_true',
65 p.add_argument('--color', choices=['on', 'off', 'auto'],
68 p.add_argument('-tap', action='store_true',
71 g_env = p.add_argument_group('test environment options')
75 mg.add_argument('-nocache', dest='cachemode', action='store_const',
78 mg.add_argument('-c', dest='cachemode',
81 g_env.add_argument('-i', dest='aiomode', default='threads',
94 mg.add_argument('-' + fmt, dest='imgfmt', action='store_const',
95 const=fmt, help=f'test {fmt}')
104 mg.add_argument('-' + prt, dest='imgproto', action='store_const',
105 const=prt, help=f'test {prt}')
111 g_bash.add_argument('-o', dest='imgopts',
112 help='options to pass to qemu-img create/convert, '
115 g_sel = p.add_argument_group('test selecting options',
116 'The following options specify test set '
118 g_sel.add_argument('-g', '--groups', metavar='group1,...',
120 g_sel.add_argument('-x', '--exclude-groups', metavar='group1,...',
122 g_sel.add_argument('--start-from', metavar='TEST',
123 help='Start from specified test: make sorted sequence '
125 'one to TEST (not inclusive). This may be used to '
129 help='tests to run, or "--" followed by a command')
130 g_sel.add_argument('--build-dir', default=get_default_path(),
131 help='Path to iotests build directory')
132 g_sel.add_argument('--source-dir',
134 help='Path to iotests build directory')
151 if len(sys.argv) > 1 and sys.argv[-len(args.tests)-1] == '--':
153 sys.exit("missing command after '--'")
159 exec_path = Path(exec_pathstr).resolve()
170 group_local = os.path.join(env.source_iotests, 'group.local')
171 if os.path.isfile(group_local):
188 print('\n'.join([os.path.basename(t) for t in tests]))
192 paths = [os.path.join(env.source_iotests, t) for t in tests]