forked from CosmosOS/Cosmos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
OnCheckin.build
41 lines (34 loc) · 2.09 KB
/
OnCheckin.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
<project>
<!-- do checks for required parameters -->
<if test="${not property::exists('CCnetDir')}">
<!-- property is neccessary to be able to use the msbuild xml logger -->
<fail message="CCnetDir property not specified!"/>
</if>
<if test="${not property::exists('NUnitDir')}">
<!-- property is neccessary to be able to run nunit tests -->
<fail message="NUnitDir property not specified!"/>
</if>
<!-- end of check for required parameters -->
<property name="IsCIRun" value="false" unless="${property::exists('IsCIRun')}"/>
<property name="BaseRepositoryPath" value="${directory::get-parent-directory(directory::get-parent-directory(directory::get-parent-directory(directory::get-parent-directory(project::get-base-directory()))))}"/>
<property name="CosmosSlnBuildOutputDir" value="${path::combine(BaseRepositoryPath, 'BuildOutput')}"/>
<delete dir="${CosmosSlnBuildOutputDir}" unless="${not directory::exists(CosmosSlnBuildOutputDir)}"/>
<mkdir dir="${CosmosSlnBuildOutputDir}"/>
<property name="BuildResultsDir" value="${path::combine(BaseRepositoryPath, 'BuildOutput')}"/>
<delete dir="${BuildResultsDir}" unless="${not directory::exists(BuildResultsDir)}"/>
<mkdir dir="${BuildResultsDir}"/>
<echo message="${BaseRepositoryPath}"/>
<!-- first compile Cosmos.sln -->
<msbuild project="${path::combine(path::combine(BaseRepositoryPath, 'Source'), 'Cosmos.sln')}"
target="Rebuild"
verbosity="Minimal">
<arg line="/p:OutputPath="${CosmosSlnBuildOutputDir}""/>
<arg line="/p:Configuration=Debug"/>
<!--<arg line="/logger:"${path::combine(CCnetDir, 'ThoughtWorks.CruiseControl.MSBuild.dll')}""/>-->
</msbuild>
<exec program="${path::combine(NUnitDir, 'nunit-console.exe')}" failonerror="false" workingdir="${CosmosSlnBuildOutputDir}">
<arg line="Indy.IL2CPU.Tests.dll /exclude=NOTWORKING /xml="${path::combine(BuildResultsDir, 'UnitTests-Results.xml')}""/>
</exec>
<exec program="${path::combine(BuildResultsDir, 'Cosmos.TestRunner.exe')}" failonerror="false" workingdir="${BuildResultsDir}">
</exec>
</project>