Xing GUO via llvm-dev
2019-Feb-22 16:15 UTC
[llvm-dev] How to write an 'expected failure test'
Hi devs, I want to write a test that expected to fail. And I want to check the error message. But I found that if the command exit code is not 0, then the test will fail. Also, if I add `XFAIL: *`, it will not check the command line output ... Can someone help me? Best Regards, Xing -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190223/259ce2cb/attachment.html>
Brian Cain via llvm-dev
2019-Feb-22 16:16 UTC
[llvm-dev] How to write an 'expected failure test'
Most tests like this use the 'not' prefix in their 'RUN' line. Note that you may want to redirect stderr independently for these tests. On Fri, Feb 22, 2019 at 10:14 AM Xing GUO via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi devs, > > I want to write a test that expected to fail. And I want to check the > error message. But I found that if the command exit code is not 0, then the > test will fail. Also, if I add `XFAIL: *`, it will not check the command > line output ... Can someone help me? > > Best Regards, > Xing > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-- -Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190222/26d6dbd1/attachment.html>
Xing GUO via llvm-dev
2019-Feb-22 16:18 UTC
[llvm-dev] How to write an 'expected failure test'
Hi Brian Thank you very much, this helps a lot! 在 2019年2月23日週六 上午12:16,Brian Cain <brian.cain at gmail.com> 寫道:> Most tests like this use the 'not' prefix in their 'RUN' line. Note that > you may want to redirect stderr independently for these tests. > > On Fri, Feb 22, 2019 at 10:14 AM Xing GUO via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi devs, >> >> I want to write a test that expected to fail. And I want to check the >> error message. But I found that if the command exit code is not 0, then the >> test will fail. Also, if I add `XFAIL: *`, it will not check the command >> line output ... Can someone help me? >> >> Best Regards, >> Xing >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > > -- > -Brian >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190223/7a36046d/attachment.html>