__init__.py 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. # coding: utf-8
  2. import re
  3. RESTART_TEST_INDICATOR = '##restart-test##'
  4. INFRASTRUCTURE_ERROR_INDICATOR = '##infrastructure-error##'
  5. RESTART_TEST_INDICATORS = [
  6. RESTART_TEST_INDICATOR,
  7. "network error",
  8. ]
  9. UID_PREFIX_DELIMITER = '-'
  10. # testing
  11. BIN_DIRECTORY = 'bin'
  12. CANON_DATA_DIR_NAME = "canondata"
  13. CANON_RESULT_FILE_NAME = "result.json"
  14. CANONIZATION_RESULT_FILE_NAME = "canonization_res.json"
  15. COMMON_CONTEXT_FILE_NAME = "common_test.context"
  16. CONSOLE_SNIPPET_LIMIT = 5000
  17. FAKE_OUTPUT_EXTS = frozenset([".mf", ".fake", ".cpf", ".cpsf"])
  18. LIST_NODE_LOG_FILE = "test_list.log"
  19. LIST_NODE_RESULT_FILE = "test_list.json"
  20. LIST_RESULT_NODE_LOG_FILE = "list_result.log"
  21. LIST_TRACE_FILE_NAME = "ytest_list.report.trace"
  22. MAX_FILE_SIZE = 1024 * 1024 * 2 # 2 MB
  23. MAX_TEST_RESTART_COUNT = 3
  24. NO_LISTED_TESTS = "NO_LISTED_TESTS"
  25. REPORT_SNIPPET_LIMIT = 12000
  26. SANITIZER_ERROR_RC = 100
  27. SUITE_CONTEXT_FILE_NAME = "test.context"
  28. TEST_LIST_FILE = "test_names_list.json"
  29. TEST_SUBTEST_SEPARATOR = '::'
  30. TESTING_OUT_DIR_NAME = "testing_out_stuff"
  31. TESTING_OUT_RAM_DRIVE_DIR_NAME = "ram_drive_output"
  32. TESTING_OUT_TAR_NAME = TESTING_OUT_DIR_NAME + ".tar.zstd"
  33. TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S.%f"
  34. TRACE_FILE_NAME = "ytest.report.trace"
  35. TRUNCATING_IGNORE_FILE_LIST = {TRACE_FILE_NAME, SUITE_CONTEXT_FILE_NAME, "run_test.log"}
  36. YT_RUN_TEST_DIR_NAME = "yt_run_test"
  37. YT_RUN_TEST_TAR_NAME = "yt_run_test.tar"
  38. COVERAGE_CFLAGS = ["-fprofile-instr-generate", "-fcoverage-mapping", "-DCLANG_COVERAGE"]
  39. COVERAGE_LDFLAGS = ["-fprofile-instr-generate", "-fcoverage-mapping"]
  40. CANON_BACKEND_KEY = "{canondata_backend}"
  41. DEFAULT_CANONIZATION_BACKEND = "storage.yandex-team.ru/get-devtools"
  42. MDS_URI_PREFIX = 'https://storage.yandex-team.ru/get-devtools/'
  43. BACKEND_URI_PREFIX = 'https://' + CANON_BACKEND_KEY + '/'
  44. MDS_SCHEME = 'mds'
  45. CANON_MDS_RESOURCE_REGEX = re.compile(re.escape(MDS_URI_PREFIX) + r'(.*?)($|#)')
  46. CANON_BACKEND_RESOURCE_REGEX = re.compile(re.escape(BACKEND_URI_PREFIX) + r'(.*?)($|#)')
  47. CANON_SBR_RESOURCE_REGEX = re.compile(r'(sbr:/?/?(\d+))')
  48. MANDATORY_ENV_VAR_NAME = 'YA_MANDATORY_ENV_VARS'
  49. BUILD_FLAGS_ALLOWED_IN_CONTEXT = {
  50. 'AUTOCHECK',
  51. # Required for local test runs
  52. 'TESTS_REQUESTED',
  53. 'USE_ARCADIA_PYTHON',
  54. 'USE_SYSTEM_PYTHON',
  55. }
  56. STYLE_TEST_TYPES = [
  57. "classpath.clash",
  58. "clang_tidy",
  59. "eslint",
  60. "gofmt",
  61. "govet",
  62. "java.style",
  63. "ktlint",
  64. "custom_lint",
  65. ]
  66. REGULAR_TEST_TYPES = [
  67. "benchmark",
  68. "boost_test",
  69. "exectest",
  70. "fuzz",
  71. "g_benchmark",
  72. "go_bench",
  73. "go_test",
  74. "gtest",
  75. "hermione",
  76. "java",
  77. "jest",
  78. "py2test",
  79. "py3test",
  80. "pytest",
  81. "unittest",
  82. ]
  83. TEST_NODE_OUTPUT_RESULTS = [TESTING_OUT_TAR_NAME, YT_RUN_TEST_TAR_NAME]
  84. # kvm
  85. DEFAULT_RAM_REQUIREMENTS_FOR_KVM = 4
  86. MAX_RAM_REQUIREMENTS_FOR_KVM = 16
  87. # distbuild
  88. DISTBUILD_STATUS_REPORT_ENV_NAME = 'NODE_EXTENDED_STATUS_FILE_PATH'
  89. DEFAULT_TEST_NODE_TIMEOUT = 15 * 60
  90. TEST_NODE_FINISHING_TIME = 5 * 60
  91. # coverage
  92. COVERAGE_FUNCTION_ENTRIES_LIMIT = 2
  93. COVERAGE_PYTHON_EXTS = (".py", ".pyx", ".pxi", ".pxd")
  94. COVERAGE_RESOLVED_FILE_NAME_PATTERN = "coverage_resolved.{}.json"
  95. CPP_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("cpp")
  96. GO_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("go")
  97. JAVA_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("java")
  98. NLG_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("nlg")
  99. PYTHON2_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("py2")
  100. PYTHON3_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("py3")
  101. TS_COVERAGE_RESOLVED_FILE_NAME = COVERAGE_RESOLVED_FILE_NAME_PATTERN.format("ts")
  102. COVERAGE_CLANG_ENV_NAME = 'LLVM_PROFILE_FILE'
  103. COVERAGE_GCOV_ENV_NAME = 'GCOV_PREFIX'
  104. COVERAGE_GO_ENV_NAME = 'GO_COVERAGE_PREFIX'
  105. COVERAGE_PYTHON_ENV_NAME = 'PYTHON_COVERAGE_PREFIX'
  106. COVERAGE_TS_ENV_NAME = 'TS_COVERAGE_PREFIX'
  107. COVERAGE_NLG_ENV_NAME = 'NLG_COVERAGE_FILENAME'
  108. COVERAGE_ENV_VARS = (
  109. COVERAGE_CLANG_ENV_NAME,
  110. COVERAGE_GCOV_ENV_NAME,
  111. COVERAGE_GO_ENV_NAME,
  112. COVERAGE_NLG_ENV_NAME,
  113. COVERAGE_PYTHON_ENV_NAME,
  114. COVERAGE_TS_ENV_NAME,
  115. )
  116. PYTHON_COVERAGE_PREFIX_FILTER_ENV_NAME = 'PYTHON_COVERAGE_PREFIX_FILTER'
  117. PYTHON_COVERAGE_EXCLUDE_REGEXP_ENV_NAME = 'PYTHON_COVERAGE_EXCLUDE_REGEXP'
  118. CLANG_COVERAGE_TEST_TYPES = (
  119. "boost_test",
  120. "coverage_extractor",
  121. "exectest",
  122. "gtest",
  123. # java tests might use shared libraries
  124. "java",
  125. "py2test",
  126. "py3test",
  127. "pytest",
  128. "unittest",
  129. )
  130. COVERAGE_TABLE_CHUNKS = 20
  131. COVERAGE_TESTS_TIMEOUT_FACTOR = 1.5
  132. COVERAGE_YT_PROXY = "hahn.yt.yandex.net"
  133. COVERAGE_YT_ROOT_PATH = "//home/codecoverage"
  134. COVERAGE_YT_TABLE_PREFIX = "datatable"
  135. # fuzzing
  136. CORPUS_DATA_FILE_NAME = 'corpus.json'
  137. CORPUS_DATA_ROOT_DIR = 'fuzzing'
  138. CORPUS_DIR_NAME = 'corpus'
  139. FUZZING_COVERAGE_ARGS = ['--sanitize-coverage=trace-div,trace-gep']
  140. FUZZING_COMPRESSION_COEF = 1.1
  141. FUZZING_DEFAULT_TIMEOUT = 3600
  142. FUZZING_FINISHING_TIME = 600
  143. FUZZING_TIMEOUT_RE = re.compile(r'(^|\s)-max_total_time=(?P<max_time>\d+)')
  144. GENERATED_CORPUS_DIR_NAME = 'mined_corpus'
  145. MAX_CORPUS_RESOURCES_ALLOWED = 5
  146. # hermione
  147. HERMIONE_REPORT_DIR_NAME = "hermione-report"
  148. HERMIONE_REPORT_TAR_NAME = HERMIONE_REPORT_DIR_NAME + ".tar"
  149. HERMIONE_REPORT_INDEX_FILE_NAME = "index.html"
  150. HERMIONE_REPORT_DB_URLS_FILE_NAME = "databaseUrls.json"
  151. HERMIONE_TESTS_READ_FILE_NAME = "tests.json"
  152. HERMIONE_TESTS_READ_STDOUT_FILE_NAME = "read_tests.out"
  153. HERMIONE_TESTS_READ_STDERR_FILE_NAME = "read_tests.err"
  154. HERMIONE_TESTS_RUN_FILE_NAME = "test_results.jsonl"
  155. HERMIONE_TESTS_RUN_STDOUT_FILE_NAME = "run_tests.out"
  156. HERMIONE_TESTS_RUN_STDERR_FILE_NAME = "run_tests.err"
  157. # yt
  158. YT_OPERATION_ID_SUBSTITUTION = '$OPERATION_ID'
  159. YT_SANDBOX_ROOT_PREFIX = '$(YT_SANDBOX_ROOT)'
  160. # sandbox
  161. SANDBOX_RUN_TEST_YT_TOKEN_VALUE_NAME = 'YA_MAKE_SANDBOX_RUN_TEST_YT_TOKEN'
  162. # global resources
  163. ANDROID_AVD_ROOT = 'ANDROID_AVD_RESOURCE_GLOBAL'
  164. ANDROID_SDK_ROOT = 'ANDROID_SDK_RESOURCE_GLOBAL'
  165. COVERAGE_PUSH_TOOL_LOCAL = 'USE_SYSTEM_COVERAGE_PUSH_TOOL'
  166. COVERAGE_PUSH_TOOL_RESOURCE = 'COVERAGE_PUSH_TOOL_RESOURCE_GLOBAL'
  167. COVERAGE_PUSH_TOOL_LB_LOCAL = 'USE_SYSTEM_COVERAGE_PUSH_TOOL_LB'
  168. COVERAGE_PUSH_TOOL_LB_RESOURCE = 'COVERAGE_PUSH_TOOL_LB_RESOURCE_GLOBAL'
  169. FLAKE8_PY2_RESOURCE = 'FLAKE8_PY2_RESOURCE_GLOBAL'
  170. FLAKE8_PY3_RESOURCE = 'FLAKE8_PY3_RESOURCE_GLOBAL'
  171. GO_TOOLS_RESOURCE = 'GO_TOOLS_RESOURCE_GLOBAL'
  172. JSTYLE_RUNNER_LIB = 'JSTYLE_LIB_RESOURCE_GLOBAL'
  173. NODEJS_RESOURCE = 'NODEJS_RESOURCE_GLOBAL'
  174. NYC_RESOURCE = 'NYC_RESOURCE_GLOBAL'
  175. TEST_TOOL3_HOST = 'TEST_TOOL3_HOST_RESOURCE_GLOBAL'
  176. TEST_TOOL3_HOST_LOCAL = 'TEST_TOOL3_HOST_LOCAL'
  177. TEST_TOOL_HOST = 'TEST_TOOL_HOST_RESOURCE_GLOBAL'
  178. TEST_TOOL_HOST_LOCAL = 'TEST_TOOL_HOST_LOCAL'
  179. TEST_TOOL_TARGET = 'TEST_TOOL_TARGET_RESOURCE_GLOBAL'
  180. TEST_TOOL_TARGET_LOCAL = 'TEST_TOOL_TARGET_LOCAL'
  181. XCODE_TOOLS_RESOURCE = 'XCODE_TOOLS_ROOT_RESOURCE_GLOBAL'
  182. WINE_TOOL = 'WINE_TOOL_RESOURCE_GLOBAL'
  183. WINE32_TOOL = 'WINE32_TOOL_RESOURCE_GLOBAL'
  184. class Enum(object):
  185. @classmethod
  186. def enumerate(cls):
  187. return [v for k, v in cls.__dict__.items() if not k.startswith("_")]
  188. class TestRequirements(Enum):
  189. Container = 'container'
  190. Cpu = 'cpu'
  191. DiskUsage = 'disk_usage'
  192. Dns = 'dns'
  193. Kvm = 'kvm'
  194. Network = 'network'
  195. Ram = 'ram'
  196. RamDisk = 'ram_disk'
  197. SbVault = 'sb_vault'
  198. YavSecret = 'yav'
  199. class TestRequirementsConstants(Enum):
  200. All = 'all'
  201. AllCpuValue = 50
  202. AllRamDiskValue = 50
  203. MinCpu = 1
  204. MinRam = 1
  205. MinRamDisk = 0
  206. @classmethod
  207. def is_all_cpu(cls, value):
  208. return value == cls.All
  209. @classmethod
  210. def get_cpu_value(cls, value):
  211. return cls.AllCpuValue if cls.is_all_cpu(value) else value
  212. @classmethod
  213. def is_all_ram_disk(cls, value):
  214. return value == cls.All
  215. @classmethod
  216. def get_ram_disk_value(cls, value):
  217. return cls.AllRamDiskValue if cls.is_all_ram_disk(value) else value
  218. class TestSize(Enum):
  219. Small = 'small'
  220. Medium = 'medium'
  221. Large = 'large'
  222. DefaultTimeouts = {
  223. Small: 60,
  224. Medium: 600,
  225. Large: 3600,
  226. }
  227. DefaultPriorities = {
  228. Small: -1,
  229. Medium: -2,
  230. Large: -3,
  231. }
  232. DefaultRequirements = {
  233. Small: {
  234. TestRequirements.Cpu: 1,
  235. TestRequirements.Ram: 8,
  236. # TestRequirements.Ram: 2,
  237. TestRequirements.RamDisk: 0,
  238. },
  239. Medium: {
  240. TestRequirements.Cpu: 1,
  241. TestRequirements.Ram: 8,
  242. # TestRequirements.Ram: 4,
  243. TestRequirements.RamDisk: 0,
  244. },
  245. Large: {
  246. TestRequirements.Cpu: 1,
  247. TestRequirements.Ram: 8,
  248. # TestRequirements.Ram: 8,
  249. TestRequirements.RamDisk: 0,
  250. },
  251. }
  252. MaxRequirements = {
  253. Small: {
  254. TestRequirements.Cpu: 4,
  255. TestRequirements.Ram: 32,
  256. # TestRequirements.Ram: 4,
  257. TestRequirements.RamDisk: 32,
  258. },
  259. Medium: {
  260. TestRequirements.Cpu: 4,
  261. # TestRequirements.Cpu: 8,
  262. TestRequirements.Ram: 32,
  263. # TestRequirements.Ram: 16,
  264. TestRequirements.RamDisk: 32,
  265. },
  266. Large: {
  267. TestRequirements.Cpu: 4,
  268. TestRequirements.Ram: 32,
  269. TestRequirements.RamDisk: 32,
  270. },
  271. }
  272. LargeMarker = "TL"
  273. MediumMarker = "TM"
  274. SmallMarker = "TS"
  275. SizeMarkers = (LargeMarker, MediumMarker, SmallMarker)
  276. SizeShorthandMap = {
  277. Large: LargeMarker,
  278. Medium: MediumMarker,
  279. Small: SmallMarker,
  280. }
  281. @classmethod
  282. def sizes(cls):
  283. return cls.DefaultTimeouts.keys()
  284. @classmethod
  285. def get_shorthand(cls, size):
  286. return cls.SizeShorthandMap[size]
  287. @classmethod
  288. def is_test_shorthand(cls, name):
  289. return name in cls.SizeMarkers
  290. @classmethod
  291. def get_default_timeout(cls, size):
  292. if size in cls.DefaultTimeouts:
  293. return cls.DefaultTimeouts[size]
  294. raise Exception("Unknown test size '{}'".format(size))
  295. @classmethod
  296. def get_default_priorities(cls, size):
  297. if size in cls.DefaultPriorities:
  298. return cls.DefaultPriorities[size]
  299. raise Exception("Unknown test size '{}'".format(size))
  300. @classmethod
  301. def get_default_requirements(cls, size):
  302. if size in cls.DefaultRequirements:
  303. return cls.DefaultRequirements[size]
  304. raise Exception("Unknown test size '{}'".format(size))
  305. @classmethod
  306. def get_max_requirements(cls, size):
  307. if size in cls.MaxRequirements:
  308. return cls.MaxRequirements[size]
  309. raise Exception("Unknown test size '{}'".format(size))
  310. class TestRunExitCode(Enum):
  311. Skipped = 2
  312. Failed = 3
  313. TimeOut = 10
  314. InfrastructureError = 12
  315. class YaTestTags(Enum):
  316. AlwaysMinimize = "ya:always_minimize"
  317. Dirty = "ya:dirty"
  318. DumpNodeEnvironment = "ya:dump_node_env"
  319. DumpTestEnvironment = "ya:dump_test_env"
  320. ExoticPlatform = "ya:exotic_platform"
  321. External = "ya:external"
  322. Fat = "ya:fat"
  323. ForceDistbuild = "ya:force_distbuild"
  324. ForceSandbox = "ya:force_sandbox"
  325. GoNoSubtestReport = "ya:go_no_subtest_report"
  326. GoTotalReport = "ya:go_total_report"
  327. HugeLogs = "ya:huge_logs"
  328. Manual = "ya:manual"
  329. MapRootUser = "ya:map_root_user"
  330. NoFuse = "ya:nofuse"
  331. NoGracefulShutdown = "ya:no_graceful_shutdown"
  332. Norestart = "ya:norestart"
  333. Noretries = "ya:noretries"
  334. NotAutocheck = "ya:not_autocheck"
  335. Notags = "ya:notags"
  336. PerfTest = "ya:perftest"
  337. Privileged = "ya:privileged"
  338. ReportChunks = "ya:report_chunks"
  339. RunWithAsserts = "ya:relwithdebinfo"
  340. SandboxCoverage = "ya:sandbox_coverage"
  341. SequentialRun = "ya:sequential_run"
  342. TraceOutput = "ya:trace_output"
  343. YtRunner = "ya:yt"
  344. CopyData = "ya:copydata"
  345. CopyDataRO = "ya:copydataro"
  346. class ServiceTags(Enum):
  347. AnyTag = "ya:anytag"
  348. class Status(object):
  349. GOOD, XFAIL, FAIL, XPASS, MISSING, CRASHED, TIMEOUT = range(1, 8)
  350. SKIPPED = -100
  351. NOT_LAUNCHED = -200
  352. CANON_DIFF = -300
  353. DESELECTED = -400
  354. INTERNAL = -int(2**31 - 1) # maxint
  355. FLAKY = -50
  356. # XFAILDIFF is internal status and should be replaced
  357. # with XFAIL or XPASS during verification stage of canon data
  358. XFAILDIFF = -90
  359. BY_NAME = {
  360. 'crashed': CRASHED,
  361. 'deselected': DESELECTED,
  362. 'diff': CANON_DIFF,
  363. 'fail': FAIL,
  364. 'flaky': FLAKY,
  365. 'good': GOOD,
  366. 'internal': INTERNAL,
  367. 'missing': MISSING,
  368. 'not_launched': NOT_LAUNCHED,
  369. 'skipped': SKIPPED,
  370. 'timeout': TIMEOUT,
  371. 'xfail': XFAIL,
  372. 'xfaildiff': XFAILDIFF,
  373. 'xpass': XPASS,
  374. }
  375. TO_STR = {
  376. CANON_DIFF: 'diff',
  377. CRASHED: 'crashed',
  378. DESELECTED: 'deselected',
  379. FAIL: 'fail',
  380. FLAKY: 'flaky',
  381. GOOD: 'good',
  382. INTERNAL: 'internal',
  383. MISSING: 'missing',
  384. NOT_LAUNCHED: 'not_launched',
  385. SKIPPED: 'skipped',
  386. TIMEOUT: 'timeout',
  387. XFAIL: 'xfail',
  388. XFAILDIFF: 'xfaildiff',
  389. XPASS: 'xpass',
  390. }
  391. class _Colors(object):
  392. _NAMES = [
  393. "blue",
  394. "cyan",
  395. "default",
  396. "green",
  397. "grey",
  398. "magenta",
  399. "red",
  400. "white",
  401. "yellow",
  402. ]
  403. _PREFIXES = ["", "light", "dark"]
  404. def __init__(self):
  405. self._table = {}
  406. for prefix in self._PREFIXES:
  407. for value in self._NAMES:
  408. name = value
  409. if prefix:
  410. name = "{}_{}".format(prefix, value)
  411. value = "{}-{}".format(prefix, value)
  412. self.__add_color(name.upper(), value)
  413. def __add_color(self, name, value):
  414. self._table[name] = value
  415. self.__setattr__(name, value)
  416. Colors = _Colors()
  417. class _Highlight(object):
  418. _MARKERS = {
  419. # special
  420. "RESET": "rst",
  421. "IMPORTANT": "imp",
  422. "UNIMPORTANT": "unimp",
  423. "BAD": "bad",
  424. "WARNING": "warn",
  425. "GOOD": "good",
  426. "PATH": "path",
  427. "ALTERNATIVE1": "alt1",
  428. "ALTERNATIVE2": "alt2",
  429. "ALTERNATIVE3": "alt3",
  430. }
  431. def __init__(self):
  432. # setting attributes because __getattr__ is much slower
  433. for attr, value in self._MARKERS.items():
  434. self.__setattr__(attr, value)
  435. Highlight = _Highlight()
  436. class _StatusColorMap(object):
  437. # There should be no XFAILDIFF, because it's internal status.
  438. # It should be replaced with XFAIL or XPASS during verification of canon data.
  439. _MAP = {
  440. 'crashed': Highlight.WARNING,
  441. 'deselected': Highlight.UNIMPORTANT,
  442. 'diff': Highlight.BAD,
  443. 'fail': Highlight.BAD,
  444. 'flaky': Highlight.ALTERNATIVE3,
  445. 'good': Highlight.GOOD,
  446. 'internal': Highlight.BAD,
  447. 'missing': Highlight.ALTERNATIVE1,
  448. 'not_launched': Highlight.BAD,
  449. 'skipped': Highlight.UNIMPORTANT,
  450. 'timeout': Highlight.BAD,
  451. 'xfail': Highlight.WARNING,
  452. 'xpass': Highlight.WARNING,
  453. }
  454. def __getitem__(self, item):
  455. return self._MAP[item]
  456. StatusColorMap = _StatusColorMap()