-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClient.build
226 lines (196 loc) · 8.96 KB
/
Client.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
<?xml version="1.0" encoding="Windows-1252"?>
<project name="MySqlClient" default="allframeworks" xmlns="http://nant.sf.net/schemas/nant-0.84.win32.net-1.0.xsd">
<description>MySQLClient Managed Provider for MySQL</description>
<!-- filesets -->
<fileset id="Source">
<include name="Driver/Properties/*.cs"/>
<include name="Driver/Source/*.cs"/>
<include name="Driver/Source/common/*.cs"/>
<include name="Driver/Source/Types/*.cs"/>
<include name="Driver/Source/zlib/*.cs"/>
</fileset>
<if test="${not property::exists('debug')}">
<property name="debug" value="false"/>
</if>
<!-- we default to optimized release binaries -->
<property name="opt" value="true"/>
<property name="buildType" value="release"/>
<if test="${(debug)}">
<property name="opt" value="false"/>
<property name="buildType" value="debug"/>
</if>
<if test="${not property::exists('defines')}">
<property name="defines" value=""/>
</if>
<if test="${not property::exists('build.dir')}">
<property name="build.dir" value="."/>
</if>
<!-- core managed driver target -->
<target name="compile-client" description="Core client target">
<property name="nant.settings.currentframework" value="${framework}"/>
<property name="outdir" value="Driver/bin/${framework}/${buildType}"/>
<mkdir dir="${outdir}" failonerror="false"/>
<resgen todir="Driver/Source">
<resources>
<include name="Driver/Properties/*.resx" />
</resources>
</resgen>
<csc output="${outdir}/MySql.Data.dll" target="library"
define="TRACE,${defines}" debug="${debug}" optimize="${opt}"
doc="${outdir}/MySql.Data.xml">
<arg value="/nowarn:0679,1591,1592,2029"/>
<resources prefix="MySql.Data.MySqlClient.Source">
<include name="Driver/Source/Resources.resources"/>
<include name="Driver/Source/ReservedWords.txt"/>
</resources>
<references>
<include name="System.Data.dll"/>
<include name="System.Drawing.dll"/>
<include name="System.Transactions.dll"/>
</references>
<sources refid="Source"/>
</csc>
</target>
<target name="compile-test-suite" description="Compiling test suite">
<property name="nant.settings.currentframework" value="${framework}"/>
<property name="outdir" value="Driver/bin/${framework}/${buildType}"/>
<csc output="${outdir}/MySql.Data.Tests.dll" target="library"
define="TRACE,${defines}" debug="${debug}" optimize="${opt}">
<arg value="/nowarn:0679,2029"/>
<sources>
<include name="TestSuite/Source/*.cs" />
</sources>
<references>
<include name="${outdir}/MySql.Data.dll"/>
<include name="System.Data.dll"/>
<include name="System.Configuration.dll"/>
<include name="System.Drawing.dll"/>
<include name="System.Transactions.dll"/>
<include name="${nunit-lib}/nunit.framework.dll"/>
</references>
</csc>
</target>
<!-- builds the client on all supported frameworks -->
<target name="allframeworks" depends="net-2.0">
</target>
<!-- core managed driver target 2.0 -->
<target name="net-2.0" description="2.0 .NET target">
<property name="nunit.dir" value="${nunit2.dir}"/>
<property name="nunit-lib" value="${nunit.dir}/bin"/>
<property name="framework" value="net-2.0"/>
<if test="${string::get-length(defines) > 0}">
<property name="defines" value="${defines},"/>
</if>
<property name="defines" value="${defines}NET20"/>
<call target="compile-client"/>
<call target="compile-test-suite"/>
</target>
<target name="mono-2.0" description="Mono 2.0 Target">
<property name="defines" value="${defines},MONO,NET20"/>
<property name="nunit-lib" value="${framework::get-framework-directory('mono-1.0')}"/>
<property name="framework" value="mono-2.0"/>
<call target="compile-client"/>
<call target="compile-test-suite"/>
</target>
<!-- testing targets -->
<target name="alltests" depends="test-net-2.0">
</target>
<target name="test-net-2.0" depends="net-2.0">
<property name="framework" value="net-2.0"/>
<call target="testclient"/>
</target>
<!--
Target to run the test suite. This target will run through all the
supported versions of MySQL, stopping the services, and then starting
them one by one and running all supported configs on each database
-->
<target name="testclient" description="Target to run NUnit tests">
<mkdir dir="results"/>
<property name="doCoverage" value="false"/>
<!-- test 4.1 -->
<echo message="Testing MySQL 4.1"/>
<property name="excludes" value="5.0,NotWorking"/>
<property name="config" value="mysql-41.config"/>
<call target="testdb"/>
<echo message="Testing MySQL 5.0"/>
<property name="excludes" value="NotWorking"/>
<property name="config" value="mysql-50.config"/>
<call target="testdb"/>
<echo message="Testing MySQL 5.1"/>
<property name="excludes" value="NotWorking"/>
<property name="config" value="mysql-51.config"/>
<call target="testdb"/>
</target>
<!--
execute the test suite against a single database instance, possibly using
coverage
-->
<target name="testdb" description="Target to test a database with all possible configurations">
<copy overwrite="true" file="testsuite/configs/${config}" tofile="Driver/bin/${framework}/${buildType}/MySql.Data.Tests.dll.config"/>
<property name="nunit-exe" value="${nunit.dir}/bin/nunit-console.exe"/>
<!-- <property name="nunit-exe" value="${nunit.dir}/mono/bin/nunit-console.exe" if="${string::contains(framework, 'mono')}"/>-->
<exec unless="${doCoverage}" program="${nunit-exe}" workingdir="Driver/bin/${framework}/${buildType}"
failonerror="true">
<arg value="/exclude=${excludes}"/>
<arg value="MySql.Data.Tests.dll"/>
<arg value="/xml=${framework}-nunit-results.xml"/>
<arg value="/nologo"/>
</exec>
<!-- <exec if="${doCoverage}" program="${ncover.executable}"
commandline="/c "${nunit-exe}" "Driver/bin/${framework}/${buildType}/MySql.Data.Tests.dll /exclude=${excludes} /xml=../../../results/nunit-${framework}-${buildType}.xml" /a MySql.Data /o results/ncover-${framework}-${config}.xml"
failonerror="true"/>-->
</target>
<!-- Run fxcop on the current build -->
<target name="fxcop" description="Runs FXCop">
<exec program="${fxcop.executable}"
commandline="/o:results/fxcop-${framework}-${buildType}.xml /c /f:bin/${framework}/${buildType}/MySql.Data.dll /s"
failonerror="false"/>
</target>
<!-- documentation target -->
<target name="Docs1.1" description="Documentation">
<ndoc>
<assemblies basedir="Driver/bin/${framework}/${buildType}">
<include name="MySql.Data.dll" />
</assemblies>
<summaries>
<include name="${build.dir}/Driver/docs/namespace.xml"/>
</summaries>
<documenters>
<documenter name="MSDN">
<property name="OutputDirectory" value="${build.dir}/Driver/bin/${framework}/${buildType}/doc/VS.Net" />
<property name="HtmlHelpName" value="MySql.Data" />
<property name="HtmlHelpCompilerFilename" value="hhc.exe" />
<property name="IncludeFavorites" value="False" />
<property name="Title" value="MySQL ADO.Net Data Provider" />
<property name="SplitTOCs" value="False" />
<property name="DefaulTOC" value="" />
<property name="ShowVisualBasic" value="True" />
<property name="ShowMissingSummaries" value="False" />
<property name="ShowMissingRemarks" value="False" />
<property name="ShowMissingParams" value="False" />
<property name="ShowMissingReturns" value="False" />
<property name="ShowMissingValues" value="False" />
<property name="DocumentInternals" value="False" />
<property name="DocumentProtected" value="True" />
<property name="DocumentPrivates" value="False" />
<property name="DocumentEmptyNamespaces" value="False" />
<property name="IncludeAssemblyVersion" value="False" />
<property name="CopyrightText" value="Copyright MySQL AB 2004-2006" />
<property name="CopyrightHref" value="http://www.mysql.com" />
</documenter>
</documenters>
</ndoc>
<!-- now copy the generated docs to the doc folder -->
<mkdir dir="doc"/>
<copy file="Driver/bin/${framework}/${buildType}/doc/VS.Net/MySql.Data.chm" todir="doc"/>
<delete dir="Driver/bin/${framework}/${buildType}/doc" failonerror="false"/>
</target>
<!-- Remove all generated files target -->
<target name="clean" description="Remove all generated files">
<delete failonerror="false">
<fileset>
<include name="bin/**" />
</fileset>
</delete>
</target>
</project>