My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
<?xml version="1.0" encoding="utf-8"?>
<project name="SPM.WEB" basedir="C:\workspace\SPM_atual\src" default="clean_reports" xmlns="http://nant.sf.net/schemas/nant.xsd" logfile="log.log">

<!-- Define of properties -->
<property name="application.dir" value="C:\workspace\SPM_atual" />
<property name="build.program" value="C:\Arquivos de programas\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" />
<property name="build.solution" value="${application.dir}\src\SPM\SPM.sln" />
<property name="pack.spm.bl" value="src\SPM.BL" />
<property name="pack.spm.dal" value="src\SPM.DAL" />
<property name="pack.spm.dtl" value="src\SPM.DTL" />
<property name="pack.spm.test" value="src\SPM.Test" />
<property name="pack.spm.web" value="src\SPM" />
<property name="cruise.control.dir" value="C:\CruiseControl.NET" />
<property name="nunit-console.exe" value="${cruise.control.dir}\tools\nunit\nunit-console.exe" />
<property name="ncover-console.exe" value="${cruise.control.dir}\tools\ncover\NCover.Console.exe" />
<property name="fxcopcmd.exe" value="${cruise.control.dir}\tools\fxcop\FxCopCmd.exe" />
<property name="relatorios" value="src\relatorios" />
<property name="unitTests.Results.Dir" value="C:\workspace\SPM_atual\src\relatorios" />
<property name="codeCoverage" value="C:\workspace\SPM_atual\src\relatorios/codecoverage" />
<property name="ndepend.console" value="${cruise.control.dir}\tools\NDepend\NDepend.Console.exe" />
<!-- Fim da declaracao de properties -->

<!-- Load tasks -->
<loadtasks assembly="${cruise.control.dir}\tools\nant\NCoverExplorer.NAntTasks.dll"/>
<loadtasks assembly="${cruise.control.dir}\tools\report4unit\M7.Tools.Nant.Tasks.dll"/>
<!-- Fim load -->

<!-- Run code covert and report html -->
<target name="CoverReport" depends="test">
<ncoverexplorer
projectName="SPM"
reportType="ModuleClassSummary"
outputDir="${application.dir}/${relatorios}"
xmlReportName="metadado\SPMReport.xml"
htmlReportName="NCover\SPMReportHTML.html"
showExcluded="True"
satisfactoryCoverage="60" >
<fileset>
<include name="${application.dir}/${relatorios}\NCover\SPMCoverageResults.xml" />
</fileset>
<exclusions>
<exclusion type="Assembly" pattern="*.Test.*" />
<exclusion type="Namespace" pattern="*.Test*" />
</exclusions>
</ncoverexplorer>
</target>

<!-- Create directories to reports and metadados-->
<target name="create_dir">
<mkdir dir="${application.dir}\src\relatorios" />
<mkdir dir="${application.dir}\src\relatorios\NUnit" />
<mkdir dir="${application.dir}\src\relatorios\NCover" />
<mkdir dir="${application.dir}\src\relatorios\Fxcop" />
<mkdir dir="${application.dir}\src\relatorios\logs" />
<mkdir dir="${application.dir}\src\relatorios\metadado" />
<mkdir dir="${application.dir}\src\relatorios\simian" />
</target>

<target name="clean">
<delete>
<fileset basedir="${application.dir}">
<!-- SPM.BL -->
<include name="${pack.spm.bl}/bin/**/*" />
<include name="${pack.spm.bl}/obj/**/*" />
<!-- SPM.DAL -->
<include name="${pack.spm.dal}/bin/**/*" />
<include name="${pack.spm.dal}/obj/**/*" />
<!-- SPM.DTL -->
<include name="${pack.spm.dtl}/bin/**/*" />
<include name="${pack.spm.dtl}/obj/**/*" />
<!-- SPM.Test -->
<include name="${pack.spm.test}/bin/**/*" />
<include name="${pack.spm.test}/obj/**/*" />
<!-- SPM.WEB -->
<include name="${pack.spm.web}/bin/**/*" />
<include name="${pack.spm.web}/obj/**/*" />
<!-- Relatorios -->
<include name="${relatorios}/**/*" />
</fileset>
</delete>
</target>

<!-- Create build of application -->
<target name="build" depends="clean,create_dir">
<exec program="${build.program}" commandline="/rebuild Release ${build.solution}" />
</target>

<!-- Run unit tests 'NUnit' and generate report html using report4unit -->
<target name="test" depends="build">
<ncover
program="${ncover-console.exe}"
commandLineExe="${nunit-console.exe}"
workingDirectory="${application.dir}/${relatorios}"
commandLineArgs="${application.dir}\${pack.spm.test}\bin\Release\SPM.Test.dll /xml=NUnit\SPMUnitResults.xml"
coverageFile="relatorios\NCover\SPMCoverageResults.xml"
logFile="relatorios\logs\SPMLog.log"
/>
<report4nunit todir="${application.dir}/${relatorios}\NUnit" format="Frames" sort="SuccessRate">
<fileset>
<include name="${application.dir}/${relatorios}\NUnit\SPMUnitResults.xml" />
</fileset>
</report4nunit>
</target>

<!-- Run analysis static code -->
<target name="fxcop" description="Runs FxCop and outputs results to fxcop.xml" depends="test,CoverReport,ndepend">
<exec program="${fxcopcmd.exe}"
commandline="/file:${application.dir}\${pack.spm.dtl}\bin\Release\SPM.DTL.dll /file:${application.dir}\${pack.spm.dal}\bin\Release\SPM.DAL.dll /file:${application.dir}\${pack.spm.bl}\bin\Release\SPM.BL.dll /rule:${cruise.control.dir}\tools\fxcop\Rules /out:${application.dir}/${relatorios}\Fxcop\SPMFxcop.xml"
basedir="${cruise.control.dir}\tools\fxcop"
/>
<style style="${cruise.control.dir}\tools\fxcop\Xml\FxCopReport.xsl" in="${application.dir}/${relatorios}\Fxcop\SPMFxcop.xml" out="${application.dir}/${relatorios}\fxcop\SPMFxcop.html" />
</target>

<!-- Clean matadados files -->
<target name="clean_reports" depends="fxcop,Cpd">
<delete dir="${application.dir}/${relatorios}\metadado" />
</target>

<target name="Cpd" description="finds duplicate code">
<exec program="${cruise.control.dir}\tools\simian\simian-2.2.17.exe">
<arg value="-includes=${application.dir}\src\**\*.cs"/>
<arg value="-formatter=xml:${application.dir}/${relatorios}\simian\simian.xml"/>
<arg value="-threshold=18"/>
</exec>
</target>

<target name="ndepend" >
<exec program="${ndepend.console}"
commandline='C:\workspace\SPM_atual\NDependSPM.xml /OutDir "${application.dir}\${relatorios}\NDepend"'/>
</target>

</project>

Change log

r271 by deixapramim on Nov 18, 2008   Diff
Atualizacao do script de build_spm.build
18/11/2008
Go to: 
Project members, sign in to write a code review

Older revisions

r214 by deixapramim on Oct 22, 2008   Diff
[No log message]
r210 by deixapramim on Oct 12, 2008   Diff
[No log message]
r156 by deixapramim on Sep 23, 2008   Diff
[No log message]
All revisions of this file

File info

Size: 5940 bytes, 132 lines
Powered by Google Project Hosting