From owner-svn-ports-head@FreeBSD.ORG Thu Sep 25 09:41:25 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25273997; Thu, 25 Sep 2014 09:41:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10571F9F; Thu, 25 Sep 2014 09:41:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8P9fOiB062060; Thu, 25 Sep 2014 09:41:24 GMT (envelope-from jmmv@FreeBSD.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8P9fOYo062058; Thu, 25 Sep 2014 09:41:24 GMT (envelope-from jmmv@FreeBSD.org) Message-Id: <201409250941.s8P9fOYo062058@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jmmv set sender to jmmv@FreeBSD.org using -f From: Julio Merino Date: Thu, 25 Sep 2014 09:41:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r369228 - in head/devel/kyua: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 09:41:25 -0000 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);