Blame view

op_robot_tests/runner.py 580 Bytes
1
from chromedriver import CHROMEDRV_PATH
2 3 4
from robot import run_cli
import os
import sys
5 6

sys.path.append(CHROMEDRV_PATH)
7 8 9 10


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