Blame view

op_robot_tests/runner.py 507 Bytes
1 2
import os
import sys
3
from robot import run_cli
4 5 6 7


def runner():
    args = sys.argv[1:]
8
    if '-d' not in args and '--outputdir' not in args:
Taras Kozlovskyi authored
9 10 11 12
        directory = os.path.join(os.getcwd(), 'test_output')
        if not os.path.exists(directory):
            os.mkdir(directory)
        args += ['-d', directory]
13 14
    if '-L' not in args and '--loglevel' not in args:
        args += ['--loglevel', 'trace:info']
15 16
    args.append(os.path.join(os.path.dirname(__file__), 'tests_files'))
    return run_cli(args)