diff options
author | Julio Merino <jmmv@FreeBSD.org> | 2014-09-25 09:41:24 +0000 |
---|---|---|
committer | Julio Merino <jmmv@FreeBSD.org> | 2014-09-25 09:41:24 +0000 |
commit | a504728bd35508138e1343bbf1bc6fb16de5b005 (patch) | |
tree | 198b4aab81ec8dabc0ef846a25aaf274cded2484 /devel | |
parent | - Convert to USES=autoreconf (diff) |
Fix TAP parsing bugs.
Pull up an upstream fix to properly deal with the TAP output of several
FreeBSD tests. Do this before a new Kyua release so that I and others can
properly test the changes before Kyua 0.11 is cut.
The FreeBSD test suite no longer reports failures caused by bad TAP parsing.
Bump PORTREVISION to 1.
Differential Revision: D832
Approved by: bapt (ports)
Notes
Notes:
svn path=/head/; revision=369228
Diffstat (limited to 'devel')
-rw-r--r-- | devel/kyua/Makefile | 1 | ||||
-rw-r--r-- | devel/kyua/files/patch-tap-parser | 67 |
2 files changed, 68 insertions, 0 deletions
diff --git a/devel/kyua/Makefile b/devel/kyua/Makefile index 8ff64951b7f2..219dd4c59882 100644 --- a/devel/kyua/Makefile +++ b/devel/kyua/Makefile @@ -2,6 +2,7 @@ PORTNAME= kyua PORTVERSION= 0.10 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= devel MASTER_SITES= https://github.com/jmmv/kyua/releases/download/${PORTNAME}-${PORTVERSION}/ \ diff --git a/devel/kyua/files/patch-tap-parser b/devel/kyua/files/patch-tap-parser new file mode 100644 index 000000000000..6995499eb00f --- /dev/null +++ b/devel/kyua/files/patch-tap-parser @@ -0,0 +1,67 @@ +Pull up upstream d71b7cecae5405c9a7042cd2376bcfd093b283dd to properly parse +the TAP output of many FreeBSD test programs. + +--- testers/tap_parser.c ++++ testers/tap_parser.c +@@ -302,7 +302,7 @@ kyua_tap_parse(const int fd, FILE* output, kyua_tap_summary_t* summary) + } + + regex_t preg; +- int code = regcomp(&preg, "^(not )?ok[ \t-]+[0-9]+", REG_EXTENDED); ++ int code = regcomp(&preg, "^(not )?ok[ \t-]+[0-9]*", REG_EXTENDED); + if (code != 0) { + error = regex_error_new(code, &preg, "regcomp failed"); + goto out_input; +diff --git a/testers/tap_parser_test.c b/testers/tap_parser_test.c +index a7379d6..c71c5de 100644 +--- testers/tap_parser_test.c ++++ testers/tap_parser_test.c +@@ -166,7 +166,7 @@ ATF_TC_WITHOUT_HEAD(parse__ok__pass); + ATF_TC_BODY(parse__ok__pass, tc) + { + const char* contents = +- "1..7\n" ++ "1..8\n" + "ok - 1\n" + " Some diagnostic message\n" + "ok - 2 This test also passed\n" +@@ -175,13 +175,14 @@ ATF_TC_BODY(parse__ok__pass, tc) + "not ok 4 # SKIP Some reason\n" + "not ok 5 # TODO Another reason\n" + "ok - 6 Doesn't make a difference SKIP\n" +- "ok - 7 Doesn't make a difference either TODO\n"; ++ "ok - 7 Doesn't make a difference either TODO\n" ++ "ok # Also works without a number\n"; + + kyua_tap_summary_t summary; + kyua_tap_summary_init(&summary); + summary.first_index = 1; +- summary.last_index = 7; +- summary.ok_count = 7; ++ summary.last_index = 8; ++ summary.ok_count = 8; + summary.not_ok_count = 0; + + ok_test(contents, &summary); +@@ -197,16 +198,17 @@ ATF_TC_BODY(parse__ok__fail, tc) + "not ok - 1 This test failed\n" + "ok - 2 This test passed\n" + "not ok - 3 This test failed\n" +- "1..5\n" ++ "1..6\n" + "not ok - 4 This test failed\n" +- "ok - 5 This test passed\n"; ++ "ok - 5 This test passed\n" ++ "not ok # Fails as well without a number\n"; + + kyua_tap_summary_t summary; + kyua_tap_summary_init(&summary); + summary.first_index = 1; +- summary.last_index = 5; ++ summary.last_index = 6; + summary.ok_count = 2; +- summary.not_ok_count = 3; ++ summary.not_ok_count = 4; + + ok_test(contents, &summary); + kyua_tap_summary_fini(&summary); |