kvm 0.0.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.rvmrc +1 -0
- data/AGPL-3.0 +661 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +32 -0
- data/LICENSE +23 -0
- data/README.md +73 -0
- data/Rakefile +48 -0
- data/bin/kvm +6 -0
- data/kvm.gemspec +28 -0
- data/lib/kvm.rb +286 -0
- data/lib/kvm/archive.rb +56 -0
- data/lib/kvm/artifact.rb +28 -0
- data/lib/kvm/db/jdbc_adapter.rb +71 -0
- data/lib/kvm/db/oracle.rb +23 -0
- data/lib/kvm/db/types.rb +11 -0
- data/lib/kvm/impex.rb +109 -0
- data/lib/kvm/log.rb +7 -0
- data/lib/kvm/resource.rb +72 -0
- data/lib/kvm/rice_release.rb +79 -0
- data/lib/kvm/rice_release_generated_dataset.rb +68 -0
- data/lib/kvm/source.rb +33 -0
- data/lib/kvm/subversion.rb +52 -0
- data/lib/kvm/version.rb +3 -0
- data/lib/kvm/wallet.rb +64 -0
- data/support/ant/INSTALL +2 -0
- data/support/ant/KEYS +1398 -0
- data/support/ant/LICENSE +272 -0
- data/support/ant/NOTICE +6 -0
- data/support/ant/README +97 -0
- data/support/ant/WHATSNEW +5467 -0
- data/support/ant/bin/ant +335 -0
- data/support/ant/bin/ant.bat +218 -0
- data/support/ant/bin/ant.cmd +93 -0
- data/support/ant/bin/antRun +24 -0
- data/support/ant/bin/antRun.bat +50 -0
- data/support/ant/bin/antRun.pl +66 -0
- data/support/ant/bin/antenv.cmd +98 -0
- data/support/ant/bin/complete-ant-cmd.pl +114 -0
- data/support/ant/bin/envset.cmd +131 -0
- data/support/ant/bin/lcp.bat +31 -0
- data/support/ant/bin/runant.pl +153 -0
- data/support/ant/bin/runant.py +102 -0
- data/support/ant/bin/runrc.cmd +60 -0
- data/support/ant/etc/ant-bootstrap.jar +0 -0
- data/support/ant/etc/changelog.xsl +148 -0
- data/support/ant/etc/checkstyle/checkstyle-frames.xsl +299 -0
- data/support/ant/etc/checkstyle/checkstyle-text.xsl +34 -0
- data/support/ant/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
- data/support/ant/etc/coverage-frames.xsl +489 -0
- data/support/ant/etc/jdepend-frames.xsl +487 -0
- data/support/ant/etc/jdepend.xsl +276 -0
- data/support/ant/etc/junit-frames-xalan1.xsl +733 -0
- data/support/ant/etc/junit-frames.xsl +902 -0
- data/support/ant/etc/junit-noframes.xsl +478 -0
- data/support/ant/etc/log.xsl +203 -0
- data/support/ant/etc/maudit-frames.xsl +503 -0
- data/support/ant/etc/mmetrics-frames.xsl +1026 -0
- data/support/ant/etc/tagdiff.xsl +179 -0
- data/support/ant/fetch.xml +343 -0
- data/support/ant/get-m2.xml +121 -0
- data/support/ant/lib/README +3 -0
- data/support/ant/lib/ant-antlr.jar +0 -0
- data/support/ant/lib/ant-antlr.pom +76 -0
- data/support/ant/lib/ant-apache-bcel.jar +0 -0
- data/support/ant/lib/ant-apache-bcel.pom +72 -0
- data/support/ant/lib/ant-apache-bsf.jar +0 -0
- data/support/ant/lib/ant-apache-bsf.pom +75 -0
- data/support/ant/lib/ant-apache-log4j.jar +0 -0
- data/support/ant/lib/ant-apache-log4j.pom +70 -0
- data/support/ant/lib/ant-apache-oro.jar +0 -0
- data/support/ant/lib/ant-apache-oro.pom +75 -0
- data/support/ant/lib/ant-apache-regexp.jar +0 -0
- data/support/ant/lib/ant-apache-regexp.pom +71 -0
- data/support/ant/lib/ant-apache-resolver.jar +0 -0
- data/support/ant/lib/ant-apache-resolver.pom +70 -0
- data/support/ant/lib/ant-apache-xalan2.jar +0 -0
- data/support/ant/lib/ant-apache-xalan2.pom +95 -0
- data/support/ant/lib/ant-commons-logging.jar +0 -0
- data/support/ant/lib/ant-commons-logging.pom +71 -0
- data/support/ant/lib/ant-commons-net.jar +0 -0
- data/support/ant/lib/ant-commons-net.pom +76 -0
- data/support/ant/lib/ant-jai.jar +0 -0
- data/support/ant/lib/ant-jai.pom +85 -0
- data/support/ant/lib/ant-javamail.jar +0 -0
- data/support/ant/lib/ant-javamail.pom +79 -0
- data/support/ant/lib/ant-jdepend.jar +0 -0
- data/support/ant/lib/ant-jdepend.pom +73 -0
- data/support/ant/lib/ant-jmf.jar +0 -0
- data/support/ant/lib/ant-jmf.pom +66 -0
- data/support/ant/lib/ant-jsch.jar +0 -0
- data/support/ant/lib/ant-jsch.pom +75 -0
- data/support/ant/lib/ant-junit.jar +0 -0
- data/support/ant/lib/ant-junit.pom +101 -0
- data/support/ant/lib/ant-junit4.jar +0 -0
- data/support/ant/lib/ant-junit4.pom +71 -0
- data/support/ant/lib/ant-launcher.jar +0 -0
- data/support/ant/lib/ant-launcher.pom +58 -0
- data/support/ant/lib/ant-netrexx.jar +0 -0
- data/support/ant/lib/ant-netrexx.pom +99 -0
- data/support/ant/lib/ant-parent.pom +120 -0
- data/support/ant/lib/ant-swing.jar +0 -0
- data/support/ant/lib/ant-swing.pom +67 -0
- data/support/ant/lib/ant-testutil.jar +0 -0
- data/support/ant/lib/ant-testutil.pom +75 -0
- data/support/ant/lib/ant.jar +0 -0
- data/support/ant/lib/ant.pom +222 -0
- data/support/ant/lib/libraries.properties +65 -0
- data/test/data/files/rice-0.0.0.0-bin.tar.gz +0 -0
- data/test/data/svn/README.txt +5 -0
- data/test/data/svn/conf/authz +32 -0
- data/test/data/svn/conf/passwd +8 -0
- data/test/data/svn/conf/svnserve.conf +47 -0
- data/test/data/svn/db/current +1 -0
- data/test/data/svn/db/format +2 -0
- data/test/data/svn/db/fs-type +1 -0
- data/test/data/svn/db/fsfs.conf +37 -0
- data/test/data/svn/db/min-unpacked-rev +1 -0
- data/test/data/svn/db/rep-cache.db +0 -0
- data/test/data/svn/db/revprops/0/0 +5 -0
- data/test/data/svn/db/revprops/0/1 +13 -0
- data/test/data/svn/db/revs/0/0 +11 -0
- data/test/data/svn/db/revs/0/1 +0 -0
- data/test/data/svn/db/txn-current +1 -0
- data/test/data/svn/db/txn-current-lock +0 -0
- data/test/data/svn/db/uuid +1 -0
- data/test/data/svn/db/write-lock +0 -0
- data/test/data/svn/format +1 -0
- data/test/data/svn/hooks/post-commit.tmpl +50 -0
- data/test/data/svn/hooks/post-lock.tmpl +44 -0
- data/test/data/svn/hooks/post-revprop-change.tmpl +56 -0
- data/test/data/svn/hooks/post-unlock.tmpl +42 -0
- data/test/data/svn/hooks/pre-commit.tmpl +81 -0
- data/test/data/svn/hooks/pre-lock.tmpl +71 -0
- data/test/data/svn/hooks/pre-revprop-change.tmpl +66 -0
- data/test/data/svn/hooks/pre-unlock.tmpl +63 -0
- data/test/data/svn/hooks/start-commit.tmpl +65 -0
- data/test/data/svn/locks/db-logs.lock +3 -0
- data/test/data/svn/locks/db.lock +3 -0
- data/test/helper.rb +146 -0
- data/test/int_test_generate_sql.rb +58 -0
- data/test/test_archive.rb +35 -0
- data/test/test_generate_sql.rb +0 -0
- data/test/test_rice_release.rb +61 -0
- data/test/test_rice_release_generated_dataset.rb +12 -0
- data/test/test_source.rb +31 -0
- data/test/test_subversion.rb +20 -0
- metadata +298 -0
@@ -0,0 +1,130 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
3
|
+
xmlns:lxslt="http://xml.apache.org/xslt"
|
4
|
+
xmlns:redirect="org.apache.xalan.lib.Redirect"
|
5
|
+
extension-element-prefixes="redirect">
|
6
|
+
|
7
|
+
<!--
|
8
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
9
|
+
contributor license agreements. See the NOTICE file distributed with
|
10
|
+
this work for additional information regarding copyright ownership.
|
11
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
12
|
+
(the "License"); you may not use this file except in compliance with
|
13
|
+
the License. You may obtain a copy of the License at
|
14
|
+
|
15
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
16
|
+
|
17
|
+
Unless required by applicable law or agreed to in writing, software
|
18
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
19
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
20
|
+
See the License for the specific language governing permissions and
|
21
|
+
limitations under the License.
|
22
|
+
-->
|
23
|
+
|
24
|
+
<xsl:output method="xml" indent="yes"/>
|
25
|
+
<xsl:decimal-format decimal-separator="." grouping-separator="," />
|
26
|
+
|
27
|
+
<xsl:param name="output.dir" select="'.'"/>
|
28
|
+
<xsl:param name="basedir" select="'.'"/>
|
29
|
+
|
30
|
+
<xsl:template match="checkstyle">
|
31
|
+
<document>
|
32
|
+
<properties>
|
33
|
+
<title>Checkstyle Audit</title>
|
34
|
+
</properties>
|
35
|
+
|
36
|
+
<body>
|
37
|
+
<xsl:apply-templates select="." mode="summary"/>
|
38
|
+
<!-- File list part -->
|
39
|
+
<xsl:apply-templates select="." mode="filelist"/>
|
40
|
+
<xsl:apply-templates select="file[count(error) != 0]"/>
|
41
|
+
</body>
|
42
|
+
</document>
|
43
|
+
</xsl:template>
|
44
|
+
|
45
|
+
<xsl:template match="checkstyle" mode="filelist">
|
46
|
+
<section name="Files">
|
47
|
+
<table>
|
48
|
+
<tr>
|
49
|
+
<th>Name</th>
|
50
|
+
<th>Errors</th>
|
51
|
+
</tr>
|
52
|
+
<xsl:apply-templates select="file[count(error) != 0]" mode="filelist">
|
53
|
+
<xsl:sort select="count(error)" order="descending" data-type="number"/>
|
54
|
+
</xsl:apply-templates>
|
55
|
+
</table>
|
56
|
+
</section>
|
57
|
+
</xsl:template>
|
58
|
+
|
59
|
+
<xsl:template match="file" mode="filelist">
|
60
|
+
<tr>
|
61
|
+
<xsl:call-template name="alternated-row"/>
|
62
|
+
<td nowrap="nowrap">
|
63
|
+
<a>
|
64
|
+
<xsl:attribute name="href">
|
65
|
+
<xsl:text>files</xsl:text><xsl:value-of select="substring-after(@name, $basedir)"/><xsl:text>.html</xsl:text>
|
66
|
+
</xsl:attribute>
|
67
|
+
<xsl:value-of select="substring-after(@name, $basedir)"/>
|
68
|
+
</a>
|
69
|
+
</td>
|
70
|
+
<td><xsl:value-of select="count(error)"/></td>
|
71
|
+
</tr>
|
72
|
+
</xsl:template>
|
73
|
+
|
74
|
+
<xsl:template match="file">
|
75
|
+
<redirect:write file="{$output.dir}/files{substring-after(@name, $basedir)}.xml">
|
76
|
+
<document>
|
77
|
+
<properties>
|
78
|
+
<title>Checkstyle Audit</title>
|
79
|
+
</properties>
|
80
|
+
|
81
|
+
<body>
|
82
|
+
<section name="Details for {substring-after(@name, $basedir)}">
|
83
|
+
<table>
|
84
|
+
<tr>
|
85
|
+
<th>Error Description</th>
|
86
|
+
<th>Line</th>
|
87
|
+
</tr>
|
88
|
+
<xsl:for-each select="error">
|
89
|
+
<tr>
|
90
|
+
<xsl:call-template name="alternated-row"/>
|
91
|
+
<td><a title="{@source}"><xsl:value-of select="@message"/></a></td>
|
92
|
+
<td><xsl:value-of select="@line"/></td>
|
93
|
+
</tr>
|
94
|
+
</xsl:for-each>
|
95
|
+
</table>
|
96
|
+
</section>
|
97
|
+
</body>
|
98
|
+
</document>
|
99
|
+
</redirect:write>
|
100
|
+
</xsl:template>
|
101
|
+
|
102
|
+
<xsl:template match="checkstyle" mode="summary">
|
103
|
+
<section name="Summary">
|
104
|
+
<xsl:variable name="fileCount" select="count(file)"/>
|
105
|
+
<xsl:variable name="errorCount" select="count(file/error)"/>
|
106
|
+
<xsl:variable name="fileErrorCount" select="count(file[count(error) != 0])"/>
|
107
|
+
<table>
|
108
|
+
<tr>
|
109
|
+
<th>Files</th>
|
110
|
+
<th>Files With Errors</th>
|
111
|
+
<th>Errors</th>
|
112
|
+
</tr>
|
113
|
+
<tr>
|
114
|
+
<xsl:call-template name="alternated-row"/>
|
115
|
+
<td><xsl:value-of select="$fileCount"/></td>
|
116
|
+
<td><xsl:value-of select="$fileErrorCount"/></td>
|
117
|
+
<td><xsl:value-of select="$errorCount"/></td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</section>
|
121
|
+
</xsl:template>
|
122
|
+
|
123
|
+
<xsl:template name="alternated-row">
|
124
|
+
<xsl:attribute name="class">
|
125
|
+
<xsl:if test="position() mod 2 = 1">oddrow</xsl:if>
|
126
|
+
<xsl:if test="position() mod 2 = 0">evenrow</xsl:if>
|
127
|
+
</xsl:attribute>
|
128
|
+
</xsl:template>
|
129
|
+
</xsl:stylesheet>
|
130
|
+
|
@@ -0,0 +1,489 @@
|
|
1
|
+
<?xml version="1.0"?>
|
2
|
+
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
3
|
+
xmlns:lxslt="http://xml.apache.org/xslt"
|
4
|
+
xmlns:redirect="org.apache.xalan.lib.Redirect"
|
5
|
+
extension-element-prefixes="redirect">
|
6
|
+
<xsl:output method="html" indent="yes"/>
|
7
|
+
<xsl:decimal-format decimal-separator="." grouping-separator="," />
|
8
|
+
<!--
|
9
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
10
|
+
contributor license agreements. See the NOTICE file distributed with
|
11
|
+
this work for additional information regarding copyright ownership.
|
12
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
13
|
+
(the "License"); you may not use this file except in compliance with
|
14
|
+
the License. You may obtain a copy of the License at
|
15
|
+
|
16
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
17
|
+
|
18
|
+
Unless required by applicable law or agreed to in writing, software
|
19
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
20
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
21
|
+
See the License for the specific language governing permissions and
|
22
|
+
limitations under the License.
|
23
|
+
-->
|
24
|
+
|
25
|
+
<!--
|
26
|
+
|
27
|
+
Sample stylesheet to be used with JProbe 3.0 XML output.
|
28
|
+
|
29
|
+
It creates a set of HTML files a la javadoc where you can browse easily
|
30
|
+
through all packages and classes.
|
31
|
+
|
32
|
+
It is best used with JProbe Coverage Ant task that gives you the benefit
|
33
|
+
of a reference classpath so that you have the list of classes/methods
|
34
|
+
that are not used at all in a given classpath.
|
35
|
+
|
36
|
+
@author Stephane Bailliez <a href="mailto:sbailliez@apache.org"/>
|
37
|
+
|
38
|
+
-->
|
39
|
+
|
40
|
+
<!-- default output directory is current directory -->
|
41
|
+
<xsl:param name="output.dir" select="'.'"/>
|
42
|
+
|
43
|
+
<!-- ======================================================================
|
44
|
+
Root element
|
45
|
+
======================================================================= -->
|
46
|
+
<xsl:template match="/snapshot">
|
47
|
+
<!-- create the index.html -->
|
48
|
+
<redirect:write file="{$output.dir}/index.html">
|
49
|
+
<xsl:call-template name="index.html"/>
|
50
|
+
</redirect:write>
|
51
|
+
|
52
|
+
<!-- create the stylesheet.css -->
|
53
|
+
<redirect:write file="{$output.dir}/stylesheet.css">
|
54
|
+
<xsl:call-template name="stylesheet.css"/>
|
55
|
+
</redirect:write>
|
56
|
+
|
57
|
+
<!-- create the overview-packages.html at the root -->
|
58
|
+
<redirect:write file="{$output.dir}/overview-summary.html">
|
59
|
+
<xsl:apply-templates select="." mode="overview.packages"/>
|
60
|
+
</redirect:write>
|
61
|
+
|
62
|
+
<!-- create the all-packages.html at the root -->
|
63
|
+
<redirect:write file="{$output.dir}/overview-frame.html">
|
64
|
+
<xsl:apply-templates select="." mode="all.packages"/>
|
65
|
+
</redirect:write>
|
66
|
+
|
67
|
+
<!-- create the all-classes.html at the root -->
|
68
|
+
<redirect:write file="{$output.dir}/allclasses-frame.html">
|
69
|
+
<xsl:apply-templates select="." mode="all.classes"/>
|
70
|
+
</redirect:write>
|
71
|
+
|
72
|
+
<!-- process all packages -->
|
73
|
+
<xsl:apply-templates select="./package" mode="write"/>
|
74
|
+
</xsl:template>
|
75
|
+
|
76
|
+
<!-- =======================================================================
|
77
|
+
Frameset definition. Entry point for the report.
|
78
|
+
3 frames: packageListFrame, classListFrame, classFrame
|
79
|
+
======================================================================= -->
|
80
|
+
<xsl:template name="index.html">
|
81
|
+
<html>
|
82
|
+
<head><title>Coverage Results.</title></head>
|
83
|
+
<frameset cols="20%,80%">
|
84
|
+
<frameset rows="30%,70%">
|
85
|
+
<frame src="overview-frame.html" name="packageListFrame"/>
|
86
|
+
<frame src="allclasses-frame.html" name="classListFrame"/>
|
87
|
+
</frameset>
|
88
|
+
<frame src="overview-summary.html" name="classFrame"/>
|
89
|
+
</frameset>
|
90
|
+
<noframes>
|
91
|
+
<h2>Frame Alert</h2>
|
92
|
+
<p>
|
93
|
+
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
|
94
|
+
</p>
|
95
|
+
</noframes>
|
96
|
+
</html>
|
97
|
+
</xsl:template>
|
98
|
+
|
99
|
+
<!-- =======================================================================
|
100
|
+
Stylesheet CSS used
|
101
|
+
======================================================================= -->
|
102
|
+
<!-- this is the stylesheet css to use for nearly everything -->
|
103
|
+
<xsl:template name="stylesheet.css">
|
104
|
+
.bannercell {
|
105
|
+
border: 0px;
|
106
|
+
padding: 0px;
|
107
|
+
}
|
108
|
+
body {
|
109
|
+
margin-left: 10;
|
110
|
+
margin-right: 10;
|
111
|
+
font:normal 80% arial,helvetica,sanserif;
|
112
|
+
background-color:#FFFFFF;
|
113
|
+
color:#000000;
|
114
|
+
}
|
115
|
+
.a td {
|
116
|
+
background: #efefef;
|
117
|
+
}
|
118
|
+
.b td {
|
119
|
+
background: #fff;
|
120
|
+
}
|
121
|
+
th, td {
|
122
|
+
text-align: left;
|
123
|
+
vertical-align: top;
|
124
|
+
}
|
125
|
+
th {
|
126
|
+
font-weight:bold;
|
127
|
+
background: #ccc;
|
128
|
+
color: black;
|
129
|
+
}
|
130
|
+
table, th, td {
|
131
|
+
font-size:100%;
|
132
|
+
border: none
|
133
|
+
}
|
134
|
+
table.log tr td, tr th {
|
135
|
+
|
136
|
+
}
|
137
|
+
h2 {
|
138
|
+
font-weight:bold;
|
139
|
+
font-size:140%;
|
140
|
+
margin-bottom: 5;
|
141
|
+
}
|
142
|
+
h3 {
|
143
|
+
font-size:100%;
|
144
|
+
font-weight:bold;
|
145
|
+
background: #525D76;
|
146
|
+
color: white;
|
147
|
+
text-decoration: none;
|
148
|
+
padding: 5px;
|
149
|
+
margin-right: 2px;
|
150
|
+
margin-left: 2px;
|
151
|
+
margin-bottom: 0;
|
152
|
+
}
|
153
|
+
</xsl:template>
|
154
|
+
|
155
|
+
<!-- =======================================================================
|
156
|
+
List of all classes in all packages
|
157
|
+
This will be the first page in the classListFrame
|
158
|
+
======================================================================= -->
|
159
|
+
<xsl:template match="snapshot" mode="all.classes">
|
160
|
+
<html>
|
161
|
+
<head>
|
162
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
163
|
+
</head>
|
164
|
+
<body>
|
165
|
+
<h2>Classes</h2>
|
166
|
+
<table width="100%">
|
167
|
+
<xsl:for-each select="package/class">
|
168
|
+
<xsl:sort select="@name"/>
|
169
|
+
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
|
170
|
+
<xsl:variable name="link">
|
171
|
+
<xsl:if test="not($package.name='')">
|
172
|
+
<xsl:value-of select="translate($package.name,'.','/')"/><xsl:text>/</xsl:text>
|
173
|
+
</xsl:if><xsl:value-of select="@name"/><xsl:text>.html</xsl:text>
|
174
|
+
</xsl:variable>
|
175
|
+
<tr>
|
176
|
+
<td nowrap="nowrap">
|
177
|
+
<a target="classFrame" href="{$link}"><xsl:value-of select="@name"/></a>
|
178
|
+
</td>
|
179
|
+
</tr>
|
180
|
+
</xsl:for-each>
|
181
|
+
</table>
|
182
|
+
</body>
|
183
|
+
</html>
|
184
|
+
</xsl:template>
|
185
|
+
|
186
|
+
<!-- list of all packages -->
|
187
|
+
<xsl:template match="snapshot" mode="all.packages">
|
188
|
+
<html>
|
189
|
+
<head>
|
190
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
191
|
+
</head>
|
192
|
+
<body>
|
193
|
+
<h2><a href="overview-summary.html" target="classFrame">Home</a></h2>
|
194
|
+
<h2>Packages</h2>
|
195
|
+
<table width="100%">
|
196
|
+
<xsl:for-each select="package">
|
197
|
+
<xsl:sort select="@name" order="ascending"/>
|
198
|
+
<tr>
|
199
|
+
<td nowrap="nowrap">
|
200
|
+
<a href="{translate(@name,'.','/')}/package-summary.html" target="classFrame">
|
201
|
+
<xsl:value-of select="@name"/>
|
202
|
+
</a>
|
203
|
+
</td>
|
204
|
+
</tr>
|
205
|
+
</xsl:for-each>
|
206
|
+
</table>
|
207
|
+
</body>
|
208
|
+
</html>
|
209
|
+
</xsl:template>
|
210
|
+
|
211
|
+
<!-- overview of statistics in packages -->
|
212
|
+
<xsl:template match="snapshot" mode="overview.packages">
|
213
|
+
<html>
|
214
|
+
<head>
|
215
|
+
<xsl:call-template name="create.stylesheet.link"/>
|
216
|
+
</head>
|
217
|
+
<body onload="open('allclasses-frame.html','classListFrame')">
|
218
|
+
<xsl:call-template name="pageHeader"/>
|
219
|
+
<h3>Summary</h3>
|
220
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
221
|
+
<tr>
|
222
|
+
<!--th width="10%" nowrap="nowrap">Date</th>
|
223
|
+
<th width="10%" nowrap="nowrap">Elapsed time</th-->
|
224
|
+
<th width="10%" nowrap="nowrap">Reported Classes</th>
|
225
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
226
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
227
|
+
</tr>
|
228
|
+
<tr class="a">
|
229
|
+
<!--td nowrap="nowrap"><xsl:value-of select="execution_log/@program_start"/></td>
|
230
|
+
<td><xsl:value-of select="format-number(execution_log/@elapsed_time div 1000,'0.0')"/>secs</td-->
|
231
|
+
<td><xsl:value-of select="count(package/class)"/></td>
|
232
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
233
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
234
|
+
</tr>
|
235
|
+
</table>
|
236
|
+
<table border="0" width="100%">
|
237
|
+
<tr>
|
238
|
+
<td style="text-align: justify;">
|
239
|
+
To ensure accurate test runs on Java applications, developers need to know how much of
|
240
|
+
the code has been tested, and where to find any untested code. Coverage helps you
|
241
|
+
locate untested code, and measure precisely how much code has been exercised.
|
242
|
+
The result is a higher quality application in a shorter period of time.
|
243
|
+
<p/>
|
244
|
+
</td>
|
245
|
+
</tr>
|
246
|
+
</table>
|
247
|
+
|
248
|
+
<h3>Packages</h3>
|
249
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
250
|
+
<xsl:apply-templates select="package[1]" mode="stats.header"/>
|
251
|
+
<!-- display packages and sort them via their coverage rate -->
|
252
|
+
<xsl:for-each select="package">
|
253
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
254
|
+
<tr>
|
255
|
+
<xsl:call-template name="alternate-row"/>
|
256
|
+
<td><a href="{translate(@name,'.','/')}/package-summary.html"><xsl:value-of select="@name"/></a></td>
|
257
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
258
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
259
|
+
</tr>
|
260
|
+
</xsl:for-each>
|
261
|
+
</table>
|
262
|
+
<xsl:call-template name="pageFooter"/>
|
263
|
+
</body>
|
264
|
+
</html>
|
265
|
+
</xsl:template>
|
266
|
+
|
267
|
+
<!--
|
268
|
+
detailed info for a package. It will output the list of classes
|
269
|
+
, the summary page, and the info for each class
|
270
|
+
-->
|
271
|
+
<xsl:template match="package" mode="write">
|
272
|
+
<xsl:variable name="package.dir">
|
273
|
+
<xsl:if test="not(@name = '')"><xsl:value-of select="translate(@name,'.','/')"/></xsl:if>
|
274
|
+
<xsl:if test="@name = ''">.</xsl:if>
|
275
|
+
</xsl:variable>
|
276
|
+
|
277
|
+
<!-- create a classes-list.html in the package directory -->
|
278
|
+
<redirect:write file="{$output.dir}/{$package.dir}/package-frame.html">
|
279
|
+
<xsl:apply-templates select="." mode="classes.list"/>
|
280
|
+
</redirect:write>
|
281
|
+
|
282
|
+
<!-- create a package-summary.html in the package directory -->
|
283
|
+
<redirect:write file="{$output.dir}/{$package.dir}/package-summary.html">
|
284
|
+
<xsl:apply-templates select="." mode="package.summary"/>
|
285
|
+
</redirect:write>
|
286
|
+
|
287
|
+
<!-- for each class, creates a @name.html -->
|
288
|
+
<xsl:for-each select="class">
|
289
|
+
<redirect:write file="{$output.dir}/{$package.dir}/{@name}.html">
|
290
|
+
<xsl:apply-templates select="." mode="class.details"/>
|
291
|
+
</redirect:write>
|
292
|
+
</xsl:for-each>
|
293
|
+
</xsl:template>
|
294
|
+
|
295
|
+
<!-- list of classes in a package -->
|
296
|
+
<xsl:template match="package" mode="classes.list">
|
297
|
+
<html>
|
298
|
+
<HEAD>
|
299
|
+
<xsl:call-template name="create.stylesheet.link">
|
300
|
+
<xsl:with-param name="package.name" select="@name"/>
|
301
|
+
</xsl:call-template>
|
302
|
+
</HEAD>
|
303
|
+
<BODY>
|
304
|
+
<table width="100%">
|
305
|
+
<tr>
|
306
|
+
<td nowrap="nowrap">
|
307
|
+
<H2><a href="package-summary.html" target="classFrame"><xsl:value-of select="@name"/></a></H2>
|
308
|
+
</td>
|
309
|
+
</tr>
|
310
|
+
</table>
|
311
|
+
|
312
|
+
<H2>Classes</H2>
|
313
|
+
<TABLE WIDTH="100%">
|
314
|
+
<xsl:for-each select="class">
|
315
|
+
<xsl:sort select="@name"/>
|
316
|
+
<tr>
|
317
|
+
<td nowrap="nowrap">
|
318
|
+
<a href="{@name}.html" target="classFrame"><xsl:value-of select="@name"/></a>
|
319
|
+
</td>
|
320
|
+
</tr>
|
321
|
+
</xsl:for-each>
|
322
|
+
</TABLE>
|
323
|
+
</BODY>
|
324
|
+
</html>
|
325
|
+
</xsl:template>
|
326
|
+
|
327
|
+
<!-- summary of a package -->
|
328
|
+
<xsl:template match="package" mode="package.summary">
|
329
|
+
<HTML>
|
330
|
+
<HEAD>
|
331
|
+
<xsl:call-template name="create.stylesheet.link">
|
332
|
+
<xsl:with-param name="package.name" select="@name"/>
|
333
|
+
</xsl:call-template>
|
334
|
+
</HEAD>
|
335
|
+
<!-- when loading this package, it will open the classes into the frame -->
|
336
|
+
<BODY onload="open('package-frame.html','classListFrame')">
|
337
|
+
<xsl:call-template name="pageHeader"/>
|
338
|
+
<h3>Package <xsl:value-of select="@name"/></h3>
|
339
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
340
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
341
|
+
<xsl:apply-templates select="." mode="stats"/>
|
342
|
+
</table>
|
343
|
+
|
344
|
+
<xsl:if test="count(class) > 0">
|
345
|
+
<H3>Classes</H3>
|
346
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
347
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
348
|
+
<xsl:apply-templates select="class" mode="stats">
|
349
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
350
|
+
</xsl:apply-templates>
|
351
|
+
</table>
|
352
|
+
</xsl:if>
|
353
|
+
<xsl:call-template name="pageFooter"/>
|
354
|
+
</BODY>
|
355
|
+
</HTML>
|
356
|
+
</xsl:template>
|
357
|
+
|
358
|
+
<!-- details of a class -->
|
359
|
+
<xsl:template match="class" mode="class.details">
|
360
|
+
<xsl:variable name="package.name" select="(ancestor::package)[last()]/@name"/>
|
361
|
+
<HTML>
|
362
|
+
<HEAD>
|
363
|
+
<xsl:call-template name="create.stylesheet.link">
|
364
|
+
<xsl:with-param name="package.name" select="$package.name"/>
|
365
|
+
</xsl:call-template>
|
366
|
+
</HEAD>
|
367
|
+
<BODY>
|
368
|
+
<xsl:call-template name="pageHeader"/>
|
369
|
+
<H3>Class <xsl:if test="not($package.name = '')"><xsl:value-of select="$package.name"/>.</xsl:if><xsl:value-of select="@name"/></H3>
|
370
|
+
|
371
|
+
<!-- class summary -->
|
372
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
373
|
+
<xsl:apply-templates select="." mode="stats.header"/>
|
374
|
+
<xsl:apply-templates select="." mode="stats"/>
|
375
|
+
</table>
|
376
|
+
|
377
|
+
<!-- details of methods -->
|
378
|
+
<H3>Methods</H3>
|
379
|
+
<table class="log" cellpadding="5" cellspacing="2" width="100%">
|
380
|
+
<xsl:apply-templates select="method[1]" mode="stats.header"/>
|
381
|
+
<xsl:apply-templates select="method" mode="stats">
|
382
|
+
<xsl:sort data-type="number" select="cov.data/@hit_lines div cov.data/@total_lines"/>
|
383
|
+
</xsl:apply-templates>
|
384
|
+
</table>
|
385
|
+
<xsl:call-template name="pageFooter"/>
|
386
|
+
</BODY>
|
387
|
+
</HTML>
|
388
|
+
|
389
|
+
</xsl:template>
|
390
|
+
|
391
|
+
<!-- Page Header -->
|
392
|
+
<xsl:template name="pageHeader">
|
393
|
+
<!-- jakarta logo -->
|
394
|
+
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
395
|
+
<tr>
|
396
|
+
<td class="bannercell" rowspan="2">
|
397
|
+
<a href="http://jakarta.apache.org/">
|
398
|
+
<img src="http://jakarta.apache.org/images/jakarta-logo.gif" alt="http://jakarta.apache.org" align="left" border="0"/>
|
399
|
+
</a>
|
400
|
+
</td>
|
401
|
+
<td style="text-align:right"><h2>Source Code Coverage</h2></td>
|
402
|
+
</tr>
|
403
|
+
<tr>
|
404
|
+
<td style="text-align:right">Designed for use with <a href='http://www.sitraka.com/jprobe'>Sitraka JProbe</a> and <a href='http://jakarta.apache.org'>Ant</a>.</td>
|
405
|
+
</tr>
|
406
|
+
</table>
|
407
|
+
<hr size="1"/>
|
408
|
+
</xsl:template>
|
409
|
+
|
410
|
+
<!-- Page Footer -->
|
411
|
+
<xsl:template name="pageFooter">
|
412
|
+
</xsl:template>
|
413
|
+
|
414
|
+
|
415
|
+
<xsl:template name="table.header">
|
416
|
+
<tr>
|
417
|
+
<th width="80%">Name</th>
|
418
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
419
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
420
|
+
</tr>
|
421
|
+
</xsl:template>
|
422
|
+
|
423
|
+
<xsl:template match="method" mode="stats.header">
|
424
|
+
<tr>
|
425
|
+
<th width="90%">Name</th>
|
426
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
427
|
+
</tr>
|
428
|
+
</xsl:template>
|
429
|
+
<xsl:template match="method" mode="stats">
|
430
|
+
<tr>
|
431
|
+
<xsl:call-template name="alternate-row"/>
|
432
|
+
<td><xsl:value-of select="@name"/></td>
|
433
|
+
<td>
|
434
|
+
<xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/>
|
435
|
+
</td>
|
436
|
+
</tr>
|
437
|
+
</xsl:template>
|
438
|
+
|
439
|
+
<xsl:template match="package|class" mode="stats.header">
|
440
|
+
<tr>
|
441
|
+
<th width="80%">Name</th>
|
442
|
+
<th width="10%" nowrap="nowrap">Methods Hit</th>
|
443
|
+
<th width="10%" nowrap="nowrap">Lines Hit</th>
|
444
|
+
</tr>
|
445
|
+
</xsl:template>
|
446
|
+
<xsl:template match="package|class" mode="stats">
|
447
|
+
<tr>
|
448
|
+
<xsl:call-template name="alternate-row"/>
|
449
|
+
<td><xsl:value-of select="@name"/></td>
|
450
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_methods div cov.data/@total_methods,'0.0%')"/></td>
|
451
|
+
<td><xsl:value-of select="format-number(cov.data/@hit_lines div cov.data/@total_lines,'0.0%')"/></td>
|
452
|
+
</tr>
|
453
|
+
</xsl:template>
|
454
|
+
|
455
|
+
<!--
|
456
|
+
transform string like a.b.c to ../../../
|
457
|
+
@param path the path to transform into a descending directory path
|
458
|
+
-->
|
459
|
+
<xsl:template name="path">
|
460
|
+
<xsl:param name="path"/>
|
461
|
+
<xsl:if test="contains($path,'.')">
|
462
|
+
<xsl:text>../</xsl:text>
|
463
|
+
<xsl:call-template name="path">
|
464
|
+
<xsl:with-param name="path"><xsl:value-of select="substring-after($path,'.')"/></xsl:with-param>
|
465
|
+
</xsl:call-template>
|
466
|
+
</xsl:if>
|
467
|
+
<xsl:if test="not(contains($path,'.')) and not($path = '')">
|
468
|
+
<xsl:text>../</xsl:text>
|
469
|
+
</xsl:if>
|
470
|
+
</xsl:template>
|
471
|
+
|
472
|
+
|
473
|
+
<!-- create the link to the stylesheet based on the package name -->
|
474
|
+
<xsl:template name="create.stylesheet.link">
|
475
|
+
<xsl:param name="package.name"/>
|
476
|
+
<LINK REL ="stylesheet" TYPE="text/css" TITLE="Style"><xsl:attribute name="href"><xsl:if test="not($package.name = 'unnamed package')"><xsl:call-template name="path"><xsl:with-param name="path" select="$package.name"/></xsl:call-template></xsl:if>stylesheet.css</xsl:attribute></LINK>
|
477
|
+
</xsl:template>
|
478
|
+
|
479
|
+
<!-- alternated row style -->
|
480
|
+
<xsl:template name="alternate-row">
|
481
|
+
<xsl:attribute name="class">
|
482
|
+
<xsl:if test="position() mod 2 = 1">a</xsl:if>
|
483
|
+
<xsl:if test="position() mod 2 = 0">b</xsl:if>
|
484
|
+
</xsl:attribute>
|
485
|
+
</xsl:template>
|
486
|
+
|
487
|
+
</xsl:stylesheet>
|
488
|
+
|
489
|
+
|