1# RUN: %{python} %s %{inputs}/unparsed-requirements 2 3import sys 4from lit.Test import Result, Test, TestSuite 5from lit.TestRunner import parseIntegratedTestScript 6from lit.TestingConfig import TestingConfig 7 8config = 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) 22suite = TestSuite("suite", sys.argv[1], sys.argv[1], config) 23 24test = Test(suite, ["test.py"], config) 25test.requires = ["meow"] 26test.unsupported = ["alpha"] 27test.xfails = ["foo"] 28 29parseIntegratedTestScript(test) 30 31error_count = 0 32if test.requires != ["meow", "woof", "quack"]: 33 error_count += 1 34if test.unsupported != ["alpha", "beta", "gamma"]: 35 error_count += 1 36if test.xfails != ["foo", "bar", "baz"]: 37 error_count += 1 38exit(error_count) 39