summaryrefslogtreecommitdiff
path: root/build/run-gcov.sh
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2004-03-09 18:55:23 +0000
committerRyan Bloom <rbb@apache.org>2004-03-09 18:55:23 +0000
commitb75be77909af8f70dc1a1d305ba44253cfac1091 (patch)
tree79fe84eac95615ee74cbaf1ba51007b9e0ee6b87 /build/run-gcov.sh
parent69e1fc42b7f6764af9c3c565e776301921056f13 (diff)
downloadapr-b75be77909af8f70dc1a1d305ba44253cfac1091.tar.gz
Add a target to generate coverage information. This assumes that you
have built for a gcov run and have already run the tests. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64952 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'build/run-gcov.sh')
-rwxr-xr-xbuild/run-gcov.sh99
1 files changed, 99 insertions, 0 deletions
diff --git a/build/run-gcov.sh b/build/run-gcov.sh
new file mode 100755
index 000000000..bf4a0a829
--- /dev/null
+++ b/build/run-gcov.sh
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+if [ ! -d coverage ]; then
+ mkdir coverage
+fi
+cd coverage
+
+for i in `find .. -name "*.bb" -maxdepth 1`; do
+ gcov $i -o ..
+done
+
+# It would be really nice to find a better way to do this than copying the
+# HTML into this script. But, I am being lazy right now.
+cat > index.html << EOF
+<!-- This is a generated file, do not edit -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
+ <meta name="author" content="APR Developers" /><meta name="email" content="dev@apr.apache.org" />
+ <title>Test Coverage</title>
+ </head>
+ <body bgcolor="#ffffff" text="#000000" link="#525D76">
+<p><a href="/"><img src="./images/apr_logo_wide.png" alt="The Apache Portable Runtime Project" border="0"/></a></p>
+ <table border="0" width="100%" cellspacing="4">
+ <tr>
+ <!-- LEFT SIDE NAVIGATION -->
+ <td valign="top" nowrap="nowrap">
+ <a href="http://apachecon.com/"
+ ><img src="http://www.apache.org/images/ac2003-150.gif" height="86"
+ width="150" border="0" alt="ApacheCon" /></a>
+ <p><b>Get Involved</b></p>
+ <menu compact="compact">
+ <li><a href="anoncvs.txt">CVS</a></li>
+ <li><a href="mailing-lists.html">Mailing Lists</a></li>
+ <li><a href="http://cvs.apache.org/snapshots/apr/">Snapshots</a></li>
+ <li><a href="compiling_win32.html">Build on Win32</a></li>
+ <li><a href="compiling_unix.html">Build on Unix</a></li>
+ </menu>
+ <p><b>Download!</b></p>
+ <menu compact="compact">
+ <li><a href="http://www.apache.org/dyn/closer.cgi/apr/">from a mirror</a></li>
+ </menu>
+ <p><b>Docs</b></p>
+ <menu compact="compact">
+ <li><a href="docs/apr/">APR</a></li>
+ <li><a href="docs/apr-util/">APR-util</a></li>
+ <li>APR-iconv</li>
+ </menu>
+ <p><b>Guidelines</b></p>
+ <menu compact="compact">
+ <li><a href="guidelines.html">Project Guidelines</a></li>
+ <li><a href="patches.html">Contributing</a></li>
+ <li><a href="versioning.html">Version Numbers</a></li>
+ </menu>
+ <p><b><a href="/info/">Miscellaneous</a></b></p>
+ <menu compact="compact">
+ <li><a href="http://www.apache.org/LICENSE.txt">License</a></li>
+ <li><a href="projects.html">Projects using APR</a></li>
+ </menu>
+ </td>
+ <!-- RIGHT SIDE INFORMATION -->
+ <td align="left" valign="top">
+ <table border="0" cellspacing="0" cellpadding="2" width="100%">
+ <tr><td bgcolor="#525D76">
+ <font color="#ffffff" face="arial,helvetica,sanserif">
+ <strong>APR Test Coverage</strong>
+ </font>
+ </td></tr>
+ <tr><td>
+ <blockquote>
+<p>This should give us some idea of how well our tests actually stress our
+code.</p>
+ </blockquote>
+
+EOF
+
+for i in `find . -name "*.gcov" -print`; do
+ name=`echo $i | awk -F'/' {'print $2'}`
+ echo " <a href=\"$name\">$name</a><br>" >> index.html
+done;
+
+cat >> index.html << EOF
+</td></tr>
+</table>
+ <!-- FOOTER -->
+ <tr><td colspan="2"><hr noshade="noshade" size="1"/></td></tr>
+ <tr><td colspan="2" align="center">
+ <font size="-1">
+ <em>Copyright &#169; 1999-2003, The Apache Software Foundation</em>
+ </font>
+ </td>
+ </tr>
+ </table>
+ </body>
+</html>
+
+EOF