Debian Codegraph @

llvm/utils/lit/tests/unparsed-requirements.py

raw
1 # RUN: %{python} %s %{inputs}/unparsed-requirements
2
3 import sys
4 from lit.Test import Result, Test, TestSuite
5 from lit.TestRunner import parseIntegratedTestScript
6 from lit.TestingConfig import TestingConfig
7
8 config = TestingConfig(
9 None,
10 "config",
11 [".txt"],
12 None,
13 [],
14 [],
15 False,
16 sys.argv[1],
17 sys.argv[1],
18 [],
19 [],
20 True,
21 )
22 suite = TestSuite("suite", sys.argv[1], sys.argv[1], config)
23
24 test = Test(suite, ["test.py"], config)
25 test.requires = ["meow"]
26 test.unsupported = ["alpha"]
27 test.xfails = ["foo"]
28
29 parseIntegratedTestScript(test)
30
31 error_count = 0
32 if test.requires != ["meow", "woof", "quack"]:
33 error_count += 1
34 if test.unsupported != ["alpha", "beta", "gamma"]:
35 error_count += 1
36 if test.xfails != ["foo", "bar", "baz"]:
37 error_count += 1
38 exit(error_count)