uppercutbuild 1.2.0.0 → 1.3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,6 +59,10 @@ It helps keep to the product updated, pays for site hosting, etc. https://www.pa
59
59
  * Adding in support for xUnit.
60
60
  * Adding in support for StorEvil.
61
61
 
62
+ ==1.3.0.0==
63
+ * Fix for spaces in the path when trying to resolve the revision for SVN - see http://code.google.com/p/uppercut/issues/detail?id=25 for details. (385)
64
+ * xUnit Support for automated testing. Will handle multiple test assemblies for you. (384)
65
+
62
66
  =1.2.0.0=
63
67
  * NuGet Support. New settings have been added to the uppercut.config: <property name="app.nuget" value="..${path.separator}${folder.references}${path.separator}NuGet${path.separator}NuGet.exe" overwrite="false" /> and a tool that goes under the lib folder: NuGet - see http://code.google.com/p/uppercut/issues/detail?id=20 for details. (378)
64
68
 
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" ?>
2
2
  <uppercut>
3
- <version>1.2.0.0</version>
3
+ <version>1.3.0.0</version>
4
4
  </uppercut>
5
5
 
@@ -28,8 +28,8 @@
28
28
  <property name="nunit.separator" value="/" if="${platform::is-windows()}" />
29
29
  <property name="test.args.framework" value="" if="${platform::is-unix()}" />
30
30
  <property name="test.args.framework" value="${nunit.separator}framework=${microsoft.framework}" if="${platform::is-windows()}" />
31
- <property name="test.args" value="${nunit.separator}xml=&quot;${dirs.test_results}${path.separator}nunit-results.xml&quot; ${nunit.separator}nologo " />
32
- <!--property name="test.args" value="${nunit.separator}xml=&quot;${dirs.test_results}${path.separator}nunit-results.xml&quot; ${nunit.separator}nologo ${test.args.framework}" /-->
31
+ <!--property name="test.args" value="${nunit.separator}xml=&quot;${dirs.test_results}${path.separator}nunit-results.xml&quot; ${nunit.separator}nologo " /-->
32
+ <property name="test.args" value="${nunit.separator}xml=&quot;${dirs.test_results}${path.separator}nunit-results.xml&quot; ${nunit.separator}nologo ${test.args.framework}" />
33
33
  <property name="test.args.exclude" value="${nunit.separator}exclude=&quot;${tests.excluded_categories.comma_separated}&quot;" />
34
34
  <property name="app.nunit.console" value="${path::get-full-path(dirs.lib)}${path.separator}NUnit${path.separator}nunit-console.exe" overwrite="false" if="${platform::is-windows()}" />
35
35
  <property name="app.nunit.console" value="nunit-console" overwrite="false" if="${platform::is-unix()}"/>
@@ -66,6 +66,7 @@
66
66
  <nant buildfile="${dirs.current}${path.separator}mbunit2.test.step" inheritall="true" if="${test.framework=='mbunit2'}" />
67
67
  <nant buildfile="${dirs.current}${path.separator}gallio.test.step" inheritall="true" if="${test.framework=='gallio'}" />
68
68
  <nant buildfile="${dirs.current}${path.separator}nunit.test.step" inheritall="true" if="${test.framework=='nunit'}" />
69
+ <nant buildfile="${dirs.current}${path.separator}xunit.test.step" inheritall="true" if="${test.framework=='xunit'}" />
69
70
  <call target="set_normal_failure_mode" />
70
71
  </target>
71
72
 
@@ -73,6 +74,7 @@
73
74
  <nant buildfile="${dirs.current}${path.separator}mbunit2.test.step" target="run_all_tests" inheritall="true" if="${test.framework=='mbunit2'}" />
74
75
  <nant buildfile="${dirs.current}${path.separator}gallio.test.step" target="run_all_tests" inheritall="true" if="${test.framework=='gallio'}" />
75
76
  <nant buildfile="${dirs.current}${path.separator}nunit.test.step" target="run_all_tests" inheritall="true" if="${test.framework=='nunit'}" />
77
+ <nant buildfile="${dirs.current}${path.separator}xunit.test.step" target="run_all_tests" inheritall="true" if="${test.framework=='xunit'}" />
76
78
  <call target="set_normal_failure_mode" />
77
79
  </target>
78
80
 
@@ -80,6 +82,7 @@
80
82
  <nant buildfile="${dirs.current}${path.separator}mbunit2.test.step" target="open_results" inheritall="true" if="${test.framework=='mbunit2'}" />
81
83
  <nant buildfile="${dirs.current}${path.separator}gallio.test.step" target="open_results" inheritall="true" if="${test.framework=='gallio'}" />
82
84
  <nant buildfile="${dirs.current}${path.separator}nunit.test.step" target="open_results" inheritall="true" if="${test.framework=='nunit'}" />
85
+ <nant buildfile="${dirs.current}${path.separator}xunit.test.step" target="open_results" inheritall="true" if="${test.framework=='xunit'}" />
83
86
  </target>
84
87
 
85
88
  <target name="set_normal_failure_mode">
@@ -0,0 +1,154 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <project name="XUnitTester" default="go">
3
+ <!-- Project UppercuT - http://projectuppercut.org -->
4
+ <!-- DO NOT EDIT THIS FILE - This follows a convention for testing with Integration tests being separated from Unit tests - find out more at http://uppercut.pbwiki.com -->
5
+ <property name="build.config.settings" value="__NONE__" overwrite="false" />
6
+ <include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" />
7
+ <property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
8
+ <include buildfile="..${path.separator}csharp.functions" />
9
+ <property name="file.current.no_extension" value="xunit.test" />
10
+ <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" />
11
+ <property name="path.to.toplevel" value="..${path.separator}.." />
12
+ <property name="folder.build_scripts" value="build" overwrite="false" />
13
+ <property name="folder.build_scripts_custom" value="build.custom" overwrite="false" />
14
+ <property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}analyzers" />
15
+ <property name="folder.code_build" value="build_output" overwrite="false" />
16
+ <property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" />
17
+ <property name="folder.app.drop" value="${project.name}" overwrite="false" />
18
+ <property name="dirs.build.code" value="${dirs.build}${path.separator}${folder.app.drop}" overwrite="false" />
19
+ <property name="folder.references" value="lib" overwrite="false" />
20
+ <property name="dirs.lib" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.references}" overwrite="false" />
21
+ <property name="microsoft.framework" value="net-3.5" overwrite="false" />
22
+ <property name="folder.build_artifacts" value="build_artifacts" overwrite="false" />
23
+ <property name="dirs.build_artifacts" value="${path::get-full-path(dirs.build)}${path.separator}${folder.build_artifacts}" />
24
+
25
+ <property name="dirs.test_results" value="${dirs.build_artifacts}${path.separator}xunit" overwrite="false" />
26
+ <property name="file.test_results" value="index" overwrite="false" />
27
+ <property name="tests.excluded_categories.comma_separated" value="Database,Integration,Slow,NotWorking,Ignore,database,integration,slow,notworking,ignore" overwrite="false" />
28
+ <property name="xunit.separator" value="--" if="${platform::is-unix()}" />
29
+ <property name="xunit.separator" value="/" if="${platform::is-windows()}" />
30
+ <property name="test.args" value="${xunit.separator}xml &quot;${dirs.test_results}${path.separator}xunit-results.xml&quot; ${xunit.separator}html &quot;${dirs.test_results}${path.separator}xunit-results.html&quot; ${xunit.separator}nunit &quot;${dirs.test_results}${path.separator}nunit-nresults.xml&quot; " />
31
+ <property name="test.args.exclude" value="${xunit.separator}exclude=&quot;${tests.excluded_categories.comma_separated}&quot;" />
32
+ <property name="app.xunit.console" value="${path::get-full-path(dirs.lib)}${path.separator}xUnit${path.separator}xunit.console.clr4.exe" overwrite="false" if="${platform::is-windows()}" />
33
+ <property name="app.xunit.console" value="${path::get-full-path(dirs.lib)}${path.separator}xUnit${path.separator}xunit-console" overwrite="false" if="${platform::is-unix()}"/>
34
+ <property name="dlls.test" value="" />
35
+ <property name="tests.ran" value="false" />
36
+ <property name="tests.run_all" value="false" />
37
+
38
+ <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
39
+ <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
40
+ <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
41
+ <property name="is.replaced" value="false" />
42
+ <property name="fail.build.on.error" value="true" />
43
+
44
+ <target name="go" depends="run_tasks" />
45
+
46
+ <target name="run_all_tests" depends="prepare, set_run_all_flag, run_tests, generate_report" description="Like go but runs all tests" />
47
+
48
+ <target name="run_tasks">
49
+ <echo message="Running ${project::get-name()} tasks." />
50
+ <call target="prepare" if="${target::exists('prepare')}" />
51
+ <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
52
+ <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
53
+ <call target="run_normal_tasks" if="${not is.replaced}" />
54
+ <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
55
+ </target>
56
+
57
+ <target name="run_normal_tasks"
58
+ depends="run_tests, generate_report"
59
+ description="Testing with NUnit." />
60
+
61
+ <target name="custom_tasks_before">
62
+ <echo message="Running custom tasks if ${file.custom.step.before} exists." />
63
+ <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
64
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
65
+ <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
66
+ </exec>
67
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
68
+ <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
69
+ </exec>
70
+ </target>
71
+
72
+ <target name="custom_tasks_replace">
73
+ <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
74
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
75
+ <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
76
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
77
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
78
+ <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
79
+ </exec>
80
+ <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
81
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
82
+ <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
83
+ </exec>
84
+ </target>
85
+
86
+ <target name="prepare">
87
+ <echo message="Removing and adding ${dirs.test_results}."/>
88
+ <delete dir="${dirs.test_results}" failonerror="false" />
89
+ <mkdir dir="${dirs.test_results}" />
90
+ </target>
91
+
92
+ <target name="set_run_all_flag">
93
+ <echo message="Running ALL test assemblies including integration and database tests with xUnit." />
94
+ <property name="tests.run_all" value="true" />
95
+ </target>
96
+
97
+ <target name="run_tests" depends="prepare" description="Running Unit Tests">
98
+ <foreach item="File" property="dll.filename">
99
+ <in>
100
+ <items>
101
+ <exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" />
102
+ <exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" if="${not tests.run_all}" />
103
+ <exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" if="${not tests.run_all}" />
104
+ <exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" />
105
+ <exclude name="${dirs.build.code}${path.separator}**${path.separator}Microsoft.*.dll" />
106
+ <include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" />
107
+ <include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" />
108
+ </items>
109
+ </in>
110
+ <do>
111
+ <if test="${dll.filename !=''}">
112
+ <property name="dll.name" value="${string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator)}" />
113
+ <property name="test.args" value="${xunit.separator}xml &quot;${dirs.test_results}${path.separator}${dll.name}-results.xml&quot; ${xunit.separator}html &quot;${dirs.test_results}${path.separator}${dll.name}-results.html&quot; ${xunit.separator}nunit &quot;${dirs.test_results}${path.separator}${dll.name}-nresults.xml&quot; " />
114
+ <property name="args.test_runner" value="${dll.name} ${test.args} " />
115
+ <echo message="Running tests using xUnit with args '${args.test_runner}' and putting results in ${dirs.test_results}."/>
116
+ <exec
117
+ program="${app.xunit.console}"
118
+ workingdir="${dirs.build.code}"
119
+ failonerror="true">
120
+ <arg value="${args.test_runner}" />
121
+ </exec>
122
+ <property name="tests.ran" value="true" />
123
+ </if>
124
+ </do>
125
+ </foreach>
126
+ </target>
127
+
128
+ <target name="generate_report">
129
+ <if test="${tests.ran}">
130
+ <nunit2report todir="${dirs.test_results}" failonerror="false" >
131
+ <fileset>
132
+ <include name="${dirs.test_results}${path.separator}*-nresults.xml"/>
133
+ </fileset>
134
+ </nunit2report>
135
+ </if>
136
+ </target>
137
+
138
+ <target name="open_results">
139
+ <echo message="Opening results - ${path::get-full-path(dirs.test_results) + path.separator + file.test_results + '.html'}" />
140
+ <results display="${path::get-full-path(dirs.test_results) + path.separator + file.test_results + '.html'}" />
141
+ </target>
142
+
143
+ <target name="custom_tasks_after">
144
+ <echo message="Running custom tasks if ${file.custom.step.after} exists." />
145
+ <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" />
146
+ <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
147
+ <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
148
+ </exec>
149
+ <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
150
+ <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
151
+ </exec>
152
+ </target>
153
+
154
+ </project>
@@ -25,6 +25,7 @@
25
25
  <property name="folder.settings" value="settings" overwrite="false" />
26
26
  <property name="folder.documentation" value="docs" overwrite="false" />
27
27
  <property name="file.build_info" value="${dirs.build}${path.separator}_BuildInfo.xml" />
28
+ <property name="file.build_log" value="${dirs.build}${path.separator}build.log" />
28
29
  <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" />
29
30
  <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" />
30
31
  <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" />
@@ -202,6 +203,11 @@
202
203
  file="${file.build_info}"
203
204
  todir="${dirs.drop}${path.separator}${folder.build_artifacts}"
204
205
  />
206
+
207
+ <copy
208
+ file="${file.build_log}"
209
+ todir="${dirs.drop}${path.separator}${folder.build_artifacts}"
210
+ />
205
211
 
206
212
  <copy
207
213
  file="${file.build_info}"
Binary file
Binary file
@@ -139,7 +139,7 @@
139
139
  <attribute type="AssemblyProductAttribute" value="${project.name}" />
140
140
  <attribute type="AssemblyDescriptionAttribute" value="${assembly.description}" />
141
141
  <attribute type="AssemblyTrademarkAttribute" value="${project.name} - ${company.name}" />
142
- <attribute type="AssemblyCopyrightAttribute" value="Copyright ${datetime::get-year(datetime::now())} ${company.name}, - Original author or authors" />
142
+ <attribute type="AssemblyCopyrightAttribute" value="Copyright © ${datetime::get-year(datetime::now())} ${company.name}, - Original author or authors" />
143
143
  <attribute type="AllowPartiallyTrustedCallers" if="${allow.partially_trusted_callers}" asis="true" />
144
144
  <attribute type="AssemblyKeyFileAttribute" value="${file.key.name.private}" if="${sign.project_with_key and not sign.key.use_relative_pathing}" />
145
145
  <attribute type="AssemblyKeyFileAttribute" value="${sign.key.relative_path_from_projects}${path.separator}${path::get-file-name(file.key.name.private)}" if="${sign.project_with_key and sign.key.use_relative_pathing}" />
@@ -60,13 +60,14 @@
60
60
  </target>
61
61
 
62
62
  <target name="get_revision">
63
- <echo message="Getting revision number from working directory ${directory::get-parent-directory(dirs.current)} or remotely at ${repository.path}."/>
63
+ <echo message="Getting revision number from working directory '${dirs.current}${path.separator}${path.to.toplevel}${path.separator}' or remotely at ${repository.path}."/>
64
64
  <!-- try to update the revision -->
65
65
  <exec
66
66
  program="svn"
67
- commandline="info ${dirs.current}${path.separator}${path.to.toplevel}${path.separator} --xml"
67
+ workingdir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}"
68
+ commandline="info .\ --xml"
68
69
  output="_revision.xml"
69
- failonerror="false"/>
70
+ failonerror="false" />
70
71
  <xmlpeek
71
72
  file="_revision.xml"
72
73
  xpath="/info/entry/commit/@revision"
@@ -74,7 +75,7 @@
74
75
  failonerror="false"/>
75
76
  <exec
76
77
  program="svn"
77
- commandline="info ${repository.path} --xml"
78
+ commandline='info "${repository.path}" --xml'
78
79
  output="_revision.xml"
79
80
  failonerror="false"
80
81
  if="${version.revision == '0'}"
@@ -63,7 +63,8 @@
63
63
  <target name="get_revision">
64
64
  <exec
65
65
  program="tf"
66
- commandline="history ${dirs.current}${path.separator}${path.to.toplevel}${path.separator} /r /noprompt /stopafter:1 /version:W"
66
+ workingdir="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}"
67
+ commandline="history .\ /r /noprompt /stopafter:1 /version:W"
67
68
  output="_revision.xml"
68
69
  failonerror="false"/>
69
70
  <loadfile
@@ -2,8 +2,15 @@
2
2
 
3
3
  SET DIR=%~d0%~p0%
4
4
 
5
- SET deploy.settings="%DIR%..\settings\${environment}.settings"
5
+ SET database.name="${database.name}"
6
+ SET sql.files.directory="${dirs.db}"
7
+ SET backup.file="${restore.from.path}"
8
+ SET server.database="${server.database}"
9
+ SET repository.path="${repository.path}"
10
+ SET version.file="_BuildInfo.xml"
11
+ SET version.xpath="//buildInfo/version"
12
+ SET environment="${environment}"
6
13
 
7
- "%DIR%NAnt\nant.exe" /f:"%DIR%scripts\database.deploy" -D:deploy.settings=%deploy.settings% -D:restore=true
14
+ "%DIR%rh\rh.exe" /d=%database.name% /f=%sql.files.directory% /s=%server.database% /vf=%version.file% /vx=%version.xpath% /r=%repository.path% /env=%environment% /simple /restore /rfp=%backup.file% /rt=1200
8
15
 
9
16
  pause
@@ -2,8 +2,15 @@
2
2
 
3
3
  SET DIR=%~d0%~p0%
4
4
 
5
- SET deploy.settings="%DIR%..\settings\${environment}.settings"
5
+ SET database.name="${database.name}"
6
+ SET sql.files.directory="${dirs.db}"
7
+ SET backup.file="${restore.from.path}"
8
+ SET server.database="${server.database}"
9
+ SET repository.path="${repository.path}"
10
+ SET version.file="_BuildInfo.xml"
11
+ SET version.xpath="//buildInfo/version"
12
+ SET environment="${environment}"
6
13
 
7
- "%DIR%NAnt\nant.exe" /f:"%DIR%scripts\database.deploy" -D:deploy.settings=%deploy.settings%
14
+ "%DIR%rh\rh.exe" /d=%database.name% /f=%sql.files.directory% /s=%server.database% /vf=%version.file% /vx=%version.xpath% /r=%repository.path% /env=%environment% /simple
8
15
 
9
16
  pause
@@ -0,0 +1,128 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+ <xsl:output method="html"/>
4
+ <xsl:template match="/">
5
+ <xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">]]></xsl:text>
6
+ <html>
7
+ <head>
8
+ <title>
9
+ xUnit.net Test Results - <xsl:value-of select="@name"/>
10
+ </title>
11
+ <style type="text/css">
12
+ body { font-family: Calibri, Verdana, Arial, sans-serif; background-color: White; color: Black; }
13
+ h2,h3,h4,h5 { margin: 0; padding: 0; }
14
+ h3 { font-weight: normal; }
15
+ h5 { font-weight: normal; font-style: italic; margin-bottom: 0.75em; }
16
+ pre { font-family: Consolas; font-size: 85%; margin: 0 0 0 1em; padding: 0; }
17
+ .divided { border-top: solid 1px #f0f5fa; padding-top: 0.5em; }
18
+ .row, .altrow { padding: 0.1em 0.3em; }
19
+ .row { background-color: #f0f5fa; }
20
+ .altrow { background-color: #e1ebf4; }
21
+ .success, .failure, .skipped { font-family: Arial Unicode MS; font-weight: normal; float: left; width: 1em; display: block; }
22
+ .success { color: #0c0; }
23
+ .failure { color: #c00; }
24
+ .skipped { color: #cc0; }
25
+ .timing { float: right; }
26
+ .indent { margin: 0.25em 0 0.5em 2em; }
27
+ .clickable { cursor: pointer; }
28
+ .testcount { font-size: 85%; }
29
+ </style>
30
+ <script language="javascript">
31
+ function ToggleClass(id) {
32
+ var elem = document.getElementById(id);
33
+ if (elem.style.display == "none") {
34
+ elem.style.display = "block";
35
+ }
36
+ else {
37
+ elem.style.display = "none";
38
+ }
39
+ }
40
+ </script>
41
+ </head>
42
+ <body>
43
+ <xsl:apply-templates/>
44
+ </body>
45
+ </html>
46
+ </xsl:template>
47
+
48
+ <xsl:template match="assemblies">
49
+ <xsl:apply-templates/>
50
+ </xsl:template>
51
+
52
+ <xsl:template match="assembly">
53
+ <h3 class="divided"><b>Results for <xsl:value-of select="@name"/></b></h3>
54
+ <div>
55
+ Tests run: <a href="#all"><b><xsl:value-of select="@total"/></b></a> &#160;
56
+ Failures: <a href="#failures"><b><xsl:value-of select="@failed"/></b></a>,
57
+ Skipped: <a href="#skipped"><b><xsl:value-of select="@skipped"/></b></a>,
58
+ Run time: <b><xsl:value-of select="@time"/>s</b>
59
+ </div>
60
+ <xsl:if test="class/test[@result='Fail']">
61
+ <br />
62
+ <h2><a name="failures"></a>Failed tests</h2>
63
+ <xsl:apply-templates select="class/test[@result='Fail']"><xsl:sort select="@name"/></xsl:apply-templates>
64
+ </xsl:if>
65
+ <xsl:if test="class/failure">
66
+ <br />
67
+ <h2><a name="failures"></a>Failed fixtures</h2>
68
+ <xsl:apply-templates select="class/failure"><xsl:sort select="../@name"/></xsl:apply-templates>
69
+ </xsl:if>
70
+ <xsl:if test="@skipped > 0">
71
+ <br />
72
+ <h2><a name="skipped"></a>Skipped tests</h2>
73
+ <xsl:apply-templates select="class/test[@result='Skip']"><xsl:sort select="@name"/></xsl:apply-templates>
74
+ </xsl:if>
75
+ <br />
76
+ <h2><a name="all"></a>All tests</h2>
77
+ <h5>Click test class name to expand/collapse test details</h5>
78
+ <xsl:apply-templates select="class"><xsl:sort select="@name"/></xsl:apply-templates>
79
+ <br /><h5>Results generated <xsl:value-of select="@run-date"/> at <xsl:value-of select="@run-time"/></h5>
80
+ </xsl:template>
81
+
82
+ <xsl:template match="test">
83
+ <div>
84
+ <xsl:attribute name="class"><xsl:if test="(position() mod 2 = 0)">alt</xsl:if>row</xsl:attribute>
85
+ <xsl:if test="@result!='Skip'"><span class="timing"><xsl:value-of select="@time"/>s</span></xsl:if>
86
+ <xsl:if test="@result='Skip'"><span class="timing">Skipped</span><span class="skipped">&#x2762;</span></xsl:if>
87
+ <xsl:if test="@result='Fail'"><span class="failure">&#x2718;</span></xsl:if>
88
+ <xsl:if test="@result='Pass'"><span class="success">&#x2714;</span></xsl:if>
89
+ &#160;<xsl:value-of select="@name"/>
90
+ <xsl:if test="child::node()/message"> : <xsl:value-of select="child::node()/message"/></xsl:if>
91
+ <br clear="all" />
92
+ <xsl:if test="failure/stack-trace">
93
+ <pre><xsl:value-of select="failure/stack-trace"/></pre>
94
+ </xsl:if>
95
+ <xsl:if test="output">
96
+ <h4>Output</h4>
97
+ <pre><xsl:value-of select="output"/></pre>
98
+ </xsl:if>
99
+ </div>
100
+ </xsl:template>
101
+
102
+ <xsl:template match="failure">
103
+ <span class="failure">&#x2718;</span> <xsl:value-of select="../@name"/> : <xsl:value-of select="message"/><br clear="all"/>
104
+ Stack Trace:<br />
105
+ <pre><xsl:value-of select="stack-trace"/></pre>
106
+ </xsl:template>
107
+
108
+ <xsl:template match="class">
109
+ <h3>
110
+ <span class="timing"><xsl:value-of select="@time"/>s</span>
111
+ <span class="clickable">
112
+ <xsl:attribute name="onclick">ToggleClass('class<xsl:value-of select="position()"/>')</xsl:attribute>
113
+ <xsl:attribute name="ondblclick">ToggleClass('class<xsl:value-of select="position()"/>')</xsl:attribute>
114
+ <xsl:if test="@failed > 0"><span class="failure">&#x2718;</span></xsl:if>
115
+ <xsl:if test="@failed = 0"><span class="success">&#x2714;</span></xsl:if>
116
+ &#160;<xsl:value-of select="@name"/>
117
+ &#160;<span class="testcount">(<xsl:value-of select="@total"/>&#160;test<xsl:if test="@total > 1">s</xsl:if>)</span>
118
+ </span>
119
+ <br clear="all" />
120
+ </h3>
121
+ <div class="indent">
122
+ <xsl:if test="@failed = 0"><xsl:attribute name="style">display: none;</xsl:attribute></xsl:if>
123
+ <xsl:attribute name="id">class<xsl:value-of select="position()"/></xsl:attribute>
124
+ <xsl:apply-templates select="test"><xsl:sort select="@name"/></xsl:apply-templates>
125
+ </div>
126
+ </xsl:template>
127
+
128
+ </xsl:stylesheet>
@@ -0,0 +1,121 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
+ <xsl:output cdata-section-elements="message stack-trace"/>
4
+
5
+ <xsl:template match="/">
6
+ <xsl:apply-templates/>
7
+ </xsl:template>
8
+
9
+ <xsl:template match="assembly">
10
+ <test-results>
11
+ <xsl:attribute name="name">
12
+ <xsl:value-of select="@name"/>
13
+ </xsl:attribute>
14
+ <xsl:attribute name="date">
15
+ <xsl:value-of select="@run-date"/>
16
+ </xsl:attribute>
17
+ <xsl:attribute name="time">
18
+ <xsl:value-of select="@run-time"/>
19
+ </xsl:attribute>
20
+ <xsl:attribute name="total">
21
+ <xsl:value-of select="@total"/>
22
+ </xsl:attribute>
23
+ <xsl:attribute name="failures">
24
+ <xsl:value-of select="@failed"/>
25
+ </xsl:attribute>
26
+ <xsl:attribute name="not-run">
27
+ <xsl:value-of select="@skipped"/>
28
+ </xsl:attribute>
29
+ <test-suite>
30
+ <xsl:attribute name="name">
31
+ <xsl:value-of select="@name"/>
32
+ </xsl:attribute>
33
+ <xsl:attribute name="success">
34
+ <xsl:if test="@failed > 0">False</xsl:if>
35
+ <xsl:if test="@failed = 0">True</xsl:if>
36
+ </xsl:attribute>
37
+ <xsl:attribute name="time">
38
+ <xsl:value-of select="@time"/>
39
+ </xsl:attribute>
40
+ <results>
41
+ <xsl:apply-templates select="class"/>
42
+ </results>
43
+ </test-suite>
44
+ </test-results>
45
+ </xsl:template>
46
+
47
+ <xsl:template match="class">
48
+ <test-suite>
49
+ <xsl:attribute name="name">
50
+ <xsl:value-of select="@name"/>
51
+ </xsl:attribute>
52
+ <xsl:attribute name="success">
53
+ <xsl:if test="@failed > 0">False</xsl:if>
54
+ <xsl:if test="@failed = 0">True</xsl:if>
55
+ </xsl:attribute>
56
+ <xsl:attribute name="time">
57
+ <xsl:value-of select="@time"/>
58
+ </xsl:attribute>
59
+ <xsl:if test="failure">
60
+ <xsl:copy-of select="failure"/>
61
+ </xsl:if>
62
+ <xsl:if test="reason">
63
+ <reason>
64
+ <xsl:apply-templates select="reason"/>
65
+ </reason>
66
+ </xsl:if>
67
+ <results>
68
+ <xsl:apply-templates select="test"/>
69
+ </results>
70
+ </test-suite>
71
+ </xsl:template>
72
+
73
+ <xsl:template match="test">
74
+ <test-case>
75
+ <xsl:attribute name="name">
76
+ <xsl:value-of select="@name"/>
77
+ </xsl:attribute>
78
+ <xsl:attribute name="executed">
79
+ <xsl:if test="@result='Skip'">False</xsl:if>
80
+ <xsl:if test="@result!='Skip'">True</xsl:if>
81
+ </xsl:attribute>
82
+ <xsl:if test="@result!='Skip'">
83
+ <xsl:attribute name="success">
84
+ <xsl:if test="@result='Fail'">False</xsl:if>
85
+ <xsl:if test="@result='Pass'">True</xsl:if>
86
+ </xsl:attribute>
87
+ </xsl:if>
88
+ <xsl:if test="@time">
89
+ <xsl:attribute name="time">
90
+ <xsl:value-of select="@time"/>
91
+ </xsl:attribute>
92
+ </xsl:if>
93
+ <xsl:apply-templates select="traits"/>
94
+ <xsl:apply-templates select="failure"/>
95
+ </test-case>
96
+ </xsl:template>
97
+
98
+ <xsl:template match="traits">
99
+ <properties>
100
+ <xsl:apply-templates select="trait"/>
101
+ </properties>
102
+ </xsl:template>
103
+
104
+ <xsl:template match="trait">
105
+ <property>
106
+ <xsl:attribute name="name">
107
+ <xsl:value-of select="@name"/>
108
+ </xsl:attribute>
109
+ <xsl:attribute name="value">
110
+ <xsl:value-of select="@value"/>
111
+ </xsl:attribute>
112
+ </property>
113
+ </xsl:template>
114
+
115
+ <xsl:template match="failure">
116
+ <failure>
117
+ <xsl:copy-of select="node()"/>
118
+ </failure>
119
+ </xsl:template>
120
+
121
+ </xsl:stylesheet>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <configuration>
3
+
4
+ <configSections>
5
+ <section name="xunit" type="Xunit.ConsoleClient.XunitConsoleConfigurationSection, xunit.console.clr4"/>
6
+ </configSections>
7
+
8
+ <xunit>
9
+ <transforms>
10
+ <add
11
+ commandline="html"
12
+ xslfile="HTML.xslt"
13
+ description="output results to HTML file"/>
14
+ <add
15
+ commandline="nunit"
16
+ xslfile="NUnitXml.xslt"
17
+ description="output results to NUnit-style XML file"/>
18
+ </transforms>
19
+ </xunit>
20
+
21
+ </configuration>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <configuration>
3
+
4
+ <configSections>
5
+ <section name="xunit" type="Xunit.ConsoleClient.XunitConsoleConfigurationSection, xunit.console.clr4.x86"/>
6
+ </configSections>
7
+
8
+ <xunit>
9
+ <transforms>
10
+ <add
11
+ commandline="html"
12
+ xslfile="HTML.xslt"
13
+ description="output results to HTML file"/>
14
+ <add
15
+ commandline="nunit"
16
+ xslfile="NUnitXml.xslt"
17
+ description="output results to NUnit-style XML file"/>
18
+ </transforms>
19
+ </xunit>
20
+
21
+ </configuration>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <configuration>
3
+
4
+ <configSections>
5
+ <section name="xunit" type="Xunit.ConsoleClient.XunitConsoleConfigurationSection, xunit.console"/>
6
+ </configSections>
7
+
8
+ <xunit>
9
+ <transforms>
10
+ <add
11
+ commandline="html"
12
+ xslfile="HTML.xslt"
13
+ description="output results to HTML file"/>
14
+ <add
15
+ commandline="nunit"
16
+ xslfile="NUnitXml.xslt"
17
+ description="output results to NUnit-style XML file"/>
18
+ </transforms>
19
+ </xunit>
20
+
21
+ </configuration>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="utf-8" ?>
2
+ <configuration>
3
+
4
+ <configSections>
5
+ <section name="xunit" type="Xunit.ConsoleClient.XunitConsoleConfigurationSection, xunit.console.x86"/>
6
+ </configSections>
7
+
8
+ <xunit>
9
+ <transforms>
10
+ <add
11
+ commandline="html"
12
+ xslfile="HTML.xslt"
13
+ description="output results to HTML file"/>
14
+ <add
15
+ commandline="nunit"
16
+ xslfile="NUnitXml.xslt"
17
+ description="output results to NUnit-style XML file"/>
18
+ </transforms>
19
+ </xunit>
20
+
21
+ </configuration>
Binary file
@@ -25,15 +25,15 @@
25
25
 
26
26
  <!-- FRAMEWORKS -->
27
27
  <!-- microsoft.framework: vb6, net-1.0, net-1.1, net-2.0, net-3.5, net-4.0, netcf-1.0, netcf-2.0, silverlight-2.0, mono-1.0, mono-2.0, mono-3.5, moonlight-2.0 (Enter multiple ones with a "," to take advantage of multitargeting) -->
28
- <property name="microsoft.framework" value="net-3.5" overwrite="false" />
28
+ <property name="microsoft.framework" value="net-4.0" overwrite="false" />
29
29
  <!-- language.short: vb,cs -->
30
30
  <property name="language.short" value="cs" overwrite="false" />
31
- <!-- test.framework: none, mbunit2, nunit, gallio - with gallio it must be installed in program files on every computer. Alternatively you can add 26MB to your repo and put it there. Little much for my tastes. -->
31
+ <!-- test.framework: none, mbunit2, nunit, xunit, gallio - with gallio it must be installed in program files on every computer. Alternatively you can add 26MB to your repo and put it there. Little much for my tastes. -->
32
32
  <property name="test.framework" value="nunit" overwrite="false" />
33
33
  <!-- source_control_type: svn, vss, tfs, vault, git, hg -->
34
- <property name="source_control_type" value="svn" overwrite="false" />
34
+ <property name="source_control_type" value="git" overwrite="false" />
35
35
 
36
- <!-- Environment spesific variables -->
36
+ <!-- Environment specific variables -->
37
37
  <property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" />
38
38
 
39
39
  <!-- ASSEMBLY VARIABLES -->
@@ -70,11 +70,13 @@
70
70
  <!-- In example, if from the top level directory, you have an item that is in lib\NCover\NCover.Console.exe you should add it here as ..\..\lib\NCover\NCover.Console.exe -->
71
71
  <!-- To not use the tool, change to a location that doesn't exist -->
72
72
  <property name="app.nunit.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NUnit${path.separator}nunit-console.exe" overwrite="false" />
73
+ <property name="app.xunit.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}xUnit${path.separator}xunit.console.clr4.exe" overwrite="false" />
73
74
  <property name="app.storevil.console" value="..${path.separator}..${path.separator}${folder.references}${path.separator}StorEvil${path.separator}StorEvil.exe" overwrite="false" />
74
75
  <property name="app.ncover" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NCover${path.separator}NCover.Console.exe" overwrite="false" />
75
76
  <property name="app.ncover_explorer" value="..${path.separator}..${path.separator}${folder.references}${path.separator}NCover${path.separator}NCoverExplorer.Console.exe" overwrite="false" />
76
77
  <property name="app.ncover.tester" value="..${path.separator}..${path.separator}${folder.references}${path.separator}MbUnit2${path.separator}MbUnit.Cons.exe" overwrite="false" if="${test.framework=='mbunit2'}" />
77
78
  <property name="app.ncover.tester" value="${app.nunit.console}" overwrite="false" if="${test.framework=='nunit'}" />
79
+ <property name="app.ncover.tester" value="${app.xunit.console}" overwrite="false" if="${test.framework=='xunit'}" />
78
80
  <property name="app.ncover.tester" value="C:\Program Files (x86)\Gallio\bin\Gallio.Host.exe" overwrite="false" if="${test.framework=='gallio'}" />
79
81
  <property name="app.ndepend" value="C:\Program Files\NDepend\NDepend.Console.exe" overwrite="false" />
80
82
  <property name="app.moma" value="..\..\${folder.references}\MoMA\MoMA.exe" overwrite="false" />
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uppercutbuild
3
3
  version: !ruby/object:Gem::Version
4
- hash: 79
4
+ hash: 71
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 2
8
+ - 3
9
9
  - 0
10
10
  - 0
11
- version: 1.2.0.0
11
+ version: 1.3.0.0
12
12
  platform: ruby
13
13
  authors:
14
14
  - Rob "FerventCoder" Reynolds
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-01-23 00:00:00 -06:00
20
+ date: 2011-03-10 00:00:00 -06:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -61,6 +61,7 @@ files:
61
61
  - lib/build/analyzers/nunit.test.step
62
62
  - lib/build/analyzers/storevil.test.step
63
63
  - lib/build/analyzers/test.step
64
+ - lib/build/analyzers/xunit.test.step
64
65
  - lib/build/Castle.Core.dll
65
66
  - lib/build/Castle.DynamicProxy2.dll
66
67
  - lib/build/Castle.MicroKernel.dll
@@ -339,6 +340,21 @@ files:
339
340
  - lib/lib/NUnit/tests/test-assembly.dll
340
341
  - lib/lib/NUnit/tests/test-utilities.dll
341
342
  - lib/lib/NUnit/tests/timing-tests.dll
343
+ - lib/lib/xUnit/HTML.xslt
344
+ - lib/lib/xUnit/NUnitXml.xslt
345
+ - lib/lib/xUnit/xunit.console.clr4.exe
346
+ - lib/lib/xUnit/xunit.console.clr4.exe.config
347
+ - lib/lib/xUnit/xunit.console.clr4.x86.exe
348
+ - lib/lib/xUnit/xunit.console.clr4.x86.exe.config
349
+ - lib/lib/xUnit/xunit.console.exe
350
+ - lib/lib/xUnit/xunit.console.exe.config
351
+ - lib/lib/xUnit/xunit.console.x86.exe
352
+ - lib/lib/xUnit/xunit.console.x86.exe.config
353
+ - lib/lib/xUnit/xunit.dll
354
+ - lib/lib/xUnit/xunit.extensions.dll
355
+ - lib/lib/xUnit/xunit.runner.msbuild.dll
356
+ - lib/lib/xUnit/xunit.runner.tdnet.dll
357
+ - lib/lib/xUnit/xunit.runner.utility.dll
342
358
  - lib/NDepend.xml
343
359
  - lib/nuget/__NAME__.nuspec
344
360
  - lib/open.bat