From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Subject: [PATCH 0/6] Detailed test coverage reports for Git Date: Sat, 24 Jul 2010 20:50:57 +0000 Message-ID: <1280004663-4887-1-git-send-email-avarab@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Junio C Hamano , Thomas Rast , =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= To: git@vger.kernel.org X-From: git-owner@vger.kernel.org Sat Jul 24 22:51:43 2010 Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oclh8-0007XA-PH for gcvg-git-2@lo.gmane.org; Sat, 24 Jul 2010 22:51:43 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756496Ab0GXUv3 convert rfc822-to-quoted-printable (ORCPT ); Sat, 24 Jul 2010 16:51:29 -0400 Received: from mail-ey0-f174.google.com ([209.85.215.174]:42551 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756324Ab0GXUv1 (ORCPT ); Sat, 24 Jul 2010 16:51:27 -0400 Received: by eya25 with SMTP id 25so268827eya.19 for ; Sat, 24 Jul 2010 13:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:mime-version:content-type :content-transfer-encoding; bh=DWO/jPo9q23n61LvGAzWnog6DxEkm+RnEGU3Qhu8Q3w=; b=XjUdt+8cUnDMYTWVLlexfJSeYJReMTjesp3tmEfCXdAH+NwTGHHLNxOqr+SFQTuEap uIE7VRwHoAa77xHqMD6tsQAZ51Ka8rehWrFn4VCWj3J43mDnwdBNw433GpdZ3bcvLcb5 /+QjB77zPwJXjcUyRyJPqk3mPyLIbzSu8PVdo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=nMyy95a+H3bhvkzUUypJnGMcBxKJ5O41DUk1KsopeJJ27LLveseTapTx1VJmZ9YVih oRdlVGPz+d13TpeH5Dil91xBOyvxODnXiCYF/S8IV74kTZSbgFuXKb6vm+YGmiybzMF/ a5ZOe2NNrT67AJric0CpN6T1gzsxcij0duZvY= Received: by 10.213.113.12 with SMTP id y12mr4646976ebp.53.1280004685852; Sat, 24 Jul 2010 13:51:25 -0700 (PDT) Received: from localhost.localdomain (dslb-088-067-237-210.pools.arcor-ip.net [88.67.237.210]) by mx.google.com with ESMTPS id a48sm2701243eei.6.2010.07.24.13.51.24 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 13:51:24 -0700 (PDT) X-Mailer: git-send-email 1.7.0.4 Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: Thomas Rast added initial test coverage support in 901c369af5. Expand on that so that coverage is extended to C files in builtin/, xdiff/ and compat/. In addition I've added support for formatting the coverage reports with gcov2perl and Devel::Cover. Here's an example report formatted with these tools: http://v.nix.is/~avar/cover_db_html/coverage.html With it we can see that Git currently has 77.1% test coverage for its core C code. It's also possible to dive in on a per-file basis, e.g. here you can see how sparse the tests for git-blame's -L option are, as I noted in a previous thread (and send partial patches): http://v.nix.is/~avar/cover_db_html/builtin-blame-c.html I didn't yet look at how I could run the test suite so that we also get test coverage for our core Perl code. Devel::Cover obviously supports that, but it's just a matter of running the tests with the right environmental variables, and merging the gcov + Devel::Cover reports. But that's a project for another day. =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason (6): gitignore: Ignore files generated by "make coverage" Makefile: Include subdirectories in "make cover" reports Makefile: Split out the untested functions target Makefile: Add coverage-report-cover-db target Makefile: Add coverage-report-cover-db-html target t/README: A new section about test coverage .gitignore | 15 +++++++++++++++ Makefile | 16 +++++++++++++++- t/README | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 1 deletions(-)