[testsuite] Add debug mode & search directory to runner

This commit is contained in:
Dan Čermák
2018-04-21 00:53:15 +02:00
parent 4656af73bc
commit c40c90141f
3 changed files with 57 additions and 1 deletions
+19 -1
View File
@@ -15,16 +15,34 @@ if __name__ == '__main__':
"--config_file",
type=str,
nargs=1,
help="Path to the suite's configuration file",
default=['suite.conf']
)
parser.add_argument(
"--verbose", "-v",
action='count',
help="verbosity level",
default=1
)
parser.add_argument(
"--debug",
help="enable debugging output",
action='store_true'
)
parser.add_argument(
"dir",
help="directory where the test are searched for (defaults to the config"
"file's location)",
default=None,
type=str,
nargs='?'
)
args = parser.parse_args()
conf_file = args.config_file[0]
discovery_root = os.path.dirname(conf_file)
discovery_root = os.path.dirname(conf_file if args.dir is None else args.dir)
system_tests.set_debug_mode(args.debug)
system_tests.configure_suite(conf_file)