Fix the Jenkins test run by skipping the negative testcases earlier

The problem is that lib.libc.locale.t_io:bad_big5_wprintf was printing out
illegal Unicode characters, which causes XML parsers to bail immediately, e.g.

% kyua report-junit > ~/report.junit
% python2 -c 'import xml.dom.minidom as md; md.parse("/home/ngie/report.junit")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/xml/dom/minidom.py", line 1918, in parse
    return expatbuilder.parse(file)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 924, in parse
    result = builder.parseFile(fp)
  File "/usr/local/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
    parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 27137, column 13
This commit is contained in:
Enji Cooper 2014-11-04 16:02:46 +00:00
parent 0ecd606b24
commit aec1a09487
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274090

View File

@ -53,14 +53,15 @@ ATF_TC_HEAD(bad_big5_wprintf, tc)
ATF_TC_BODY(bad_big5_wprintf, tc)
{
#ifdef __FreeBSD__
atf_tc_skip("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
/* XXX implementation detail knowledge (wchar_t encoding) */
wchar_t ibuf[] = { 0xcf10, 0 };
setlocale(LC_CTYPE, "zh_TW.Big5");
#if defined(__FreeBSD__)
atf_tc_expect_fail("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
ATF_REQUIRE_ERRNO(EILSEQ, wprintf(L"%ls\n", ibuf) < 0);
ATF_REQUIRE(ferror(stdout));
}
@ -73,15 +74,16 @@ ATF_TC_HEAD(bad_big5_swprintf, tc)
ATF_TC_BODY(bad_big5_swprintf, tc)
{
#ifdef __FreeBSD__
atf_tc_skip("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
/* XXX implementation detail knowledge (wchar_t encoding) */
wchar_t ibuf[] = { 0xcf10, 0 };
wchar_t obuf[20];
setlocale(LC_CTYPE, "zh_TW.Big5");
#if defined(__FreeBSD__)
atf_tc_expect_fail("does not fail as expected (may be implementation "
"specific issue with the test)");
#endif
ATF_REQUIRE_ERRNO(EILSEQ,
swprintf(obuf, sizeof(obuf), L"%ls\n", ibuf) < 0);
}
@ -171,7 +173,7 @@ ATF_TC_BODY(bad_big5_getwc, tc)
ATF_REQUIRE(fp != NULL);
setlocale(LC_CTYPE, "zh_TW.Big5");
#if defined(__FreeBSD__)
#ifdef __FreeBSD__
atf_tc_expect_fail("does not return WEOF as expected");
#endif
ATF_REQUIRE_EQ(getwc(fp), WEOF);