[LIT] Handle xml characters in test names
authorChris Matthews <cmatthews5@apple.com>
Wed, 9 May 2018 23:48:32 +0000 (23:48 +0000)
committerChris Matthews <cmatthews5@apple.com>
Wed, 9 May 2018 23:48:32 +0000 (23:48 +0000)
commit069a1eb3bbcb9d959ae8d61738c8b98a5398096a
treea6e3b5117307f0c6f53da155f95ae8f49565d790
parent2f348ea1c75646d98b9079fae527c6e600a2beb1
[LIT] Handle xml characters in test names

Lit creates malformed xml when the test case has an & in the name.

Escape those correctly.

This also adds a test case which I will add other nasty encoding issues to in some followup commits.

llvm-svn: 331942
llvm/utils/lit/lit/Test.py
llvm/utils/lit/tests/test-output.py
llvm/utils/lit/tests/xunit-output.py