summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/utils/lit/lit/Test.py8
-rw-r--r--llvm/utils/lit/tests/shtest-xunit-output.py10
2 files changed, 12 insertions, 6 deletions
diff --git a/llvm/utils/lit/lit/Test.py b/llvm/utils/lit/lit/Test.py
index 6bebb733d69..3d93009d6f0 100644
--- a/llvm/utils/lit/lit/Test.py
+++ b/llvm/utils/lit/lit/Test.py
@@ -384,6 +384,12 @@ class Test:
fil.write(encoded_output)
fil.write("]]></failure>\n</testcase>")
elif self.result.code == UNSUPPORTED:
- fil.write(">\n\t<skipped />\n</testcase>\n")
+ unsupported_features = self.getMissingRequiredFeatures()
+ if unsupported_features:
+ skip_message = "Skipping because of: " + ", ".join(unsupported_features)
+ else:
+ skip_message = "Skipping because of configuration."
+
+ fil.write(">\n\t<skipped message=\"{}\" />\n</testcase>\n".format(skip_message))
else:
fil.write("/>")
diff --git a/llvm/utils/lit/tests/shtest-xunit-output.py b/llvm/utils/lit/tests/shtest-xunit-output.py
index 6974e62a34b..6c5269a2fed 100644
--- a/llvm/utils/lit/tests/shtest-xunit-output.py
+++ b/llvm/utils/lit/tests/shtest-xunit-output.py
@@ -33,12 +33,12 @@
# CHECK: <testcase classname='shtest-format.shtest-format' name='pass.txt' time='{{[0-9]+\.[0-9]+}}'/>
# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-any-missing.txt' time='{{[0-9]+\.[0-9]+}}'>
-# CHECK-NEXT:<skipped />
+# CHECK-NEXT:<skipped message="Skipping because of: a-missing-feature || a-missing-feature-2" />
# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-any-present.txt' time='{{[0-9]+\.[0-9]+}}'/>
# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-missing.txt' time='{{[0-9]+\.[0-9]+}}'>
-# CHECK-NEXT:<skipped />
+# CHECK-NEXT:<skipped message="Skipping because of: a-missing-feature" />
# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-present.txt' time='{{[0-9]+\.[0-9]+}}'/>
@@ -49,12 +49,12 @@
# CHECK: <testcase classname='shtest-format.shtest-format' name='requires-triple.txt' time='{{[0-9]+\.[0-9]+}}'>
-# CHECK-NEXT:<skipped />
+# CHECK-NEXT:<skipped message="Skipping because of: x86_64" />
# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-expr-false.txt' time='{{[0-9]+\.[0-9]+}}'/>
# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-expr-true.txt' time='{{[0-9]+\.[0-9]+}}'>
-# CHECK-NEXT:<skipped />
+# CHECK-NEXT:<skipped message="Skipping because of configuration." />
# CHECK: <testcase classname='shtest-format.shtest-format' name='unsupported-star.txt' time='{{[0-9]+\.[0-9]+}}'>
# CHECK-NEXT: <failure{{[ ]*}}>
@@ -62,7 +62,7 @@
# CHECK-NEXT: </testcase>
# CHECK: <testcase classname='shtest-format.unsupported_dir' name='some-test.txt' time='{{[0-9]+\.[0-9]+}}'>
-# CHECK-NEXT:<skipped />
+# CHECK-NEXT:<skipped message="Skipping because of configuration." />
# CHECK: <testcase classname='shtest-format.shtest-format' name='xfail-expr-false.txt' time='{{[0-9]+\.[0-9]+}}'/>
OpenPOWER on IntegriCloud