errors.py 585 B

123456789101112131415161718
  1. import os
  2. import sys
  3. class RestartTestException(Exception):
  4. def __init__(self, *args, **kwargs):
  5. super(RestartTestException, self).__init__(*args, **kwargs)
  6. sys.stderr.write("##restart-test##\n")
  7. sys.stderr.flush()
  8. os.environ["FORCE_EXIT_TESTSFAILED"] = "1"
  9. class InfrastructureException(Exception):
  10. def __init__(self, *args, **kwargs):
  11. super(InfrastructureException, self).__init__(*args, **kwargs)
  12. sys.stderr.write("##infrastructure-error##\n")
  13. sys.stderr.flush()
  14. os.environ["FORCE_EXIT_TESTSFAILED"] = "1"