aboutsummaryrefslogtreecommitdiffstats
path: root/devtools/ya/handlers/test/__init__.py
blob: 2b3b2e4de485aa2e944ad4b6ccc4e35ac2280432 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import app

from build.build_handler import do_ya_make
from build.build_opts import ya_make_options

import core.yarg


class YaTestYaHandler(core.yarg.OptsHandler):
    description = 'Build and run all tests\n[[imp]]ya test[[rst]] is alias for [[imp]]ya make -A[[rst]]'

    def __init__(self):
        core.yarg.OptsHandler.__init__(
            self,
            action=app.execute(action=do_ya_make),
            examples=[
                core.yarg.UsageExample(
                    '{prefix}',
                    'Build and run all tests',
                    good_looking=101,
                ),
                core.yarg.UsageExample(
                    '{prefix} -t',
                    'Build and run small tests only',
                    good_looking=102,
                ),
                core.yarg.UsageExample(
                    '{prefix} -tt',
                    'Build and run small and medium tests',
                    good_looking=103,
                ),
            ],
            description=self.description,
            opts=ya_make_options(
                free_build_targets=True,
                is_ya_test=True,
                strip_idle_build_results=True,
            ),
            visible=True,
        )