aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/testing/yatest_common/yatest/common/errors.py
blob: d7c444465b2d216eec1bd76fe250d850e527c822 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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"