summaryrefslogtreecommitdiff
path: root/utils/lit/tests
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-01-24 16:17:04 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-01-24 16:17:04 +0000
commita9970f0c85ee08724690f2ea1bedbadca12d3b17 (patch)
tree0602435d36591b32a994ae5fdf27923169d2ecba /utils/lit/tests
parent74df25e831983f2efd56d9f97b4beb4f62ed9d45 (diff)
Revert "r292904 - [lit] Allow boolean expressions in REQUIRES and XFAIL
and UNSUPPORTED" After r292904 llvm-lit fails to emit the test results in the XML format for Apple's internal buildbots. rdar://30164800 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292942 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/lit/tests')
-rw-r--r--utils/lit/tests/Inputs/shtest-format/requires-missing.txt7
-rw-r--r--utils/lit/tests/Inputs/shtest-format/requires-present.txt4
-rw-r--r--utils/lit/tests/Inputs/shtest-format/requires-star.txt3
-rw-r--r--utils/lit/tests/Inputs/shtest-format/requires-triple.txt3
-rw-r--r--utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt9
-rw-r--r--utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt4
-rw-r--r--utils/lit/tests/Inputs/shtest-format/unsupported-star.txt3
-rw-r--r--utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt3
-rw-r--r--utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt4
-rw-r--r--utils/lit/tests/boolean-parsing.py4
-rw-r--r--utils/lit/tests/shtest-format.py15
-rw-r--r--utils/lit/tests/unit/TestRunner.py57
12 files changed, 7 insertions, 109 deletions
diff --git a/utils/lit/tests/Inputs/shtest-format/requires-missing.txt b/utils/lit/tests/Inputs/shtest-format/requires-missing.txt
index d643e57edca..9e6648d8b8f 100644
--- a/utils/lit/tests/Inputs/shtest-format/requires-missing.txt
+++ b/utils/lit/tests/Inputs/shtest-format/requires-missing.txt
@@ -1,5 +1,2 @@
-# REQUIRES with a false clause. Test should not run.
-REQUIRES: true
-REQUIRES: a-missing-feature, true
-REQUIRES: true
-RUN: false
+RUN: true
+REQUIRES: a-missing-feature
diff --git a/utils/lit/tests/Inputs/shtest-format/requires-present.txt b/utils/lit/tests/Inputs/shtest-format/requires-present.txt
index 9fcbdca69be..064f7074a76 100644
--- a/utils/lit/tests/Inputs/shtest-format/requires-present.txt
+++ b/utils/lit/tests/Inputs/shtest-format/requires-present.txt
@@ -1,4 +1,2 @@
-# REQUIRES with only true clauses. Test should run.
-REQUIRES: a-present-feature, true, !not-true
-REQUIRES: true
RUN: true
+REQUIRES: a-present-feature
diff --git a/utils/lit/tests/Inputs/shtest-format/requires-star.txt b/utils/lit/tests/Inputs/shtest-format/requires-star.txt
deleted file mode 100644
index 5566d8b15b0..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/requires-star.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# '*' only works in XFAIL
-REQUIRES: *
-RUN: false
diff --git a/utils/lit/tests/Inputs/shtest-format/requires-triple.txt b/utils/lit/tests/Inputs/shtest-format/requires-triple.txt
deleted file mode 100644
index 6470bf40414..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/requires-triple.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# REQUIRES line that uses target triple, which doesn't work. Test should not run
-REQUIRES: x86_64
-RUN: false
diff --git a/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt b/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt
deleted file mode 100644
index 00c6160a367..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/unsupported-expr-false.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-# UNSUPPORTED with only false clauses. Test should run.
-UNSUPPORTED: false
-UNSUPPORTED: false, not-true
-UNSUPPORTED: false
-UNSUPPORTED: still-not-true
-UNSUPPORTED: false
-UNSUPPORTED: false
-UNSUPPORTED: false
-RUN: true
diff --git a/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt b/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt
deleted file mode 100644
index f48ba7b2c2d..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/unsupported-expr-true.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# UNSUPPORTED with a true clause. Test should not run.
-UNSUPPORTED: false
-UNSUPPORTED: false, false, false, _64-unk && a-present-feature, false
-RUN: false
diff --git a/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt b/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt
deleted file mode 100644
index 16630207dac..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/unsupported-star.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# '*' only works in XFAIL
-UNSUPPORTED: *
-RUN: false
diff --git a/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt b/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt
deleted file mode 100644
index 83b0de1621d..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/xfail-expr-false.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-# XFAIL with only false clauses. Test should run.
-XFAIL: false, a-missing-feature || ! a-present-feature || ! x86_64, false
-RUN: true
diff --git a/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt b/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt
deleted file mode 100644
index 3c197484897..00000000000
--- a/utils/lit/tests/Inputs/shtest-format/xfail-expr-true.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# XFAIL with a true clause. Test should not run.
-XFAIL: false
-XFAIL: false, a-present-feature && ! a-missing-feature && x86_64
-RUN: false
diff --git a/utils/lit/tests/boolean-parsing.py b/utils/lit/tests/boolean-parsing.py
deleted file mode 100644
index 372a94d2332..00000000000
--- a/utils/lit/tests/boolean-parsing.py
+++ /dev/null
@@ -1,4 +0,0 @@
-# Test the boolean expression parser
-# used for REQUIRES and UNSUPPORTED and XFAIL
-
-# RUN: %{python} -m lit.BooleanExpression
diff --git a/utils/lit/tests/shtest-format.py b/utils/lit/tests/shtest-format.py
index 37e3e1c1262..20884f8c485 100644
--- a/utils/lit/tests/shtest-format.py
+++ b/utils/lit/tests/shtest-format.py
@@ -50,14 +50,7 @@
# CHECK: PASS: shtest-format :: requires-any-present.txt
# CHECK: UNSUPPORTED: shtest-format :: requires-missing.txt
# CHECK: PASS: shtest-format :: requires-present.txt
-# CHECK: UNRESOLVED: shtest-format :: requires-star.txt
-# CHECK: UNSUPPORTED: shtest-format :: requires-triple.txt
-# CHECK: PASS: shtest-format :: unsupported-expr-false.txt
-# CHECK: UNSUPPORTED: shtest-format :: unsupported-expr-true.txt
-# CHECK: UNRESOLVED: shtest-format :: unsupported-star.txt
# CHECK: UNSUPPORTED: shtest-format :: unsupported_dir/some-test.txt
-# CHECK: PASS: shtest-format :: xfail-expr-false.txt
-# CHECK: XFAIL: shtest-format :: xfail-expr-true.txt
# CHECK: XFAIL: shtest-format :: xfail-feature.txt
# CHECK: XFAIL: shtest-format :: xfail-target.txt
# CHECK: XFAIL: shtest-format :: xfail.txt
@@ -77,9 +70,9 @@
# CHECK: shtest-format :: external_shell/fail_with_bad_encoding.txt
# CHECK: shtest-format :: fail.txt
-# CHECK: Expected Passes : 7
-# CHECK: Expected Failures : 4
-# CHECK: Unsupported Tests : 5
-# CHECK: Unresolved Tests : 3
+# CHECK: Expected Passes : 5
+# CHECK: Expected Failures : 3
+# CHECK: Unsupported Tests : 3
+# CHECK: Unresolved Tests : 1
# CHECK: Unexpected Passes : 1
# CHECK: Unexpected Failures: 3
diff --git a/utils/lit/tests/unit/TestRunner.py b/utils/lit/tests/unit/TestRunner.py
index ed0affa2832..ff11834fed7 100644
--- a/utils/lit/tests/unit/TestRunner.py
+++ b/utils/lit/tests/unit/TestRunner.py
@@ -108,63 +108,6 @@ class TestIntegratedTestKeywordParser(unittest.TestCase):
value = custom_parser.getValue()
self.assertItemsEqual(value, ['a', 'b', 'c'])
- def test_bad_keywords(self):
- def custom_parse(line_number, line, output):
- return output
-
- try:
- IntegratedTestKeywordParser("TAG_NO_SUFFIX", ParserKind.TAG),
- self.fail("TAG_NO_SUFFIX failed to raise an exception")
- except ValueError as e:
- pass
- except BaseException as e:
- self.fail("TAG_NO_SUFFIX raised the wrong exception: %r" % e)
-
- try:
- IntegratedTestKeywordParser("TAG_WITH_COLON:", ParserKind.TAG),
- self.fail("TAG_WITH_COLON: failed to raise an exception")
- except ValueError as e:
- pass
- except BaseException as e:
- self.fail("TAG_WITH_COLON: raised the wrong exception: %r" % e)
-
- try:
- IntegratedTestKeywordParser("LIST_WITH_DOT.", ParserKind.LIST),
- self.fail("LIST_WITH_DOT. failed to raise an exception")
- except ValueError as e:
- pass
- except BaseException as e:
- self.fail("LIST_WITH_DOT. raised the wrong exception: %r" % e)
-
- try:
- IntegratedTestKeywordParser("CUSTOM_NO_SUFFIX",
- ParserKind.CUSTOM, custom_parse),
- self.fail("CUSTOM_NO_SUFFIX failed to raise an exception")
- except ValueError as e:
- pass
- except BaseException as e:
- self.fail("CUSTOM_NO_SUFFIX raised the wrong exception: %r" % e)
-
- # Both '.' and ':' are allowed for CUSTOM keywords.
- try:
- IntegratedTestKeywordParser("CUSTOM_WITH_DOT.",
- ParserKind.CUSTOM, custom_parse),
- except BaseException as e:
- self.fail("CUSTOM_WITH_DOT. raised an exception: %r" % e)
- try:
- IntegratedTestKeywordParser("CUSTOM_WITH_COLON:",
- ParserKind.CUSTOM, custom_parse),
- except BaseException as e:
- self.fail("CUSTOM_WITH_COLON: raised an exception: %r" % e)
-
- try:
- IntegratedTestKeywordParser("CUSTOM_NO_PARSER:",
- ParserKind.CUSTOM),
- self.fail("CUSTOM_NO_PARSER: failed to raise an exception")
- except ValueError as e:
- pass
- except BaseException as e:
- self.fail("CUSTOM_NO_PARSER: raised the wrong exception: %r" % e)
if __name__ == '__main__':
TestIntegratedTestKeywordParser.load_keyword_parser_lit_tests()