aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common/yatest/common/errors.py
blob: 8c038fc381ba1c995c6f31b0099fa74e813372f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import os
import sys


class RestartTestException(Exception):

    def __init__(self, *args, **kwargs):
        super(RestartTestException, self).__init__(*args, **kwargs)
        sys.stderr.write("##restart-test##\n")
        sys.stderr.flush()
        os.environ["FORCE_EXIT_TESTSFAILED"] = "1"


class InfrastructureException(Exception):

    def __init__(self, *args, **kwargs):
        super(InfrastructureException, self).__init__(*args, **kwargs)
        sys.stderr.write("##infrastructure-error##\n")
        sys.stderr.flush()
        os.environ["FORCE_EXIT_TESTSFAILED"] = "1"