Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2014 09:41:24 +0000 (UTC)
From:      Julio Merino <jmmv@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r369228 - in head/devel/kyua: . files
Message-ID:  <201409250941.s8P9fOYo062058@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jmmv (src committer)
Date: Thu Sep 25 09:41:24 2014
New Revision: 369228
URL: http://svnweb.freebsd.org/changeset/ports/369228
QAT: https://qat.redports.org/buildarchive/r369228/

Log:
  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)

Added:
  head/devel/kyua/files/patch-tap-parser   (contents, props changed)
Modified:
  head/devel/kyua/Makefile

Modified: head/devel/kyua/Makefile
==============================================================================
--- head/devel/kyua/Makefile	Thu Sep 25 09:24:57 2014	(r369227)
+++ head/devel/kyua/Makefile	Thu Sep 25 09:41:24 2014	(r369228)
@@ -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}/ \

Added: head/devel/kyua/files/patch-tap-parser
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/kyua/files/patch-tap-parser	Thu Sep 25 09:41:24 2014	(r369228)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201409250941.s8P9fOYo062058>