Update of /cvsroot/mocklib/netmocklib/bldfiles
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4115/bldfiles
Modified Files:
project.build project.properties directory.properties
Added Files:
config.FxCop
Log Message:
ant build is now passing with NUnit and with fxcop...yeah.
Index: project.build
===================================================================
RCS file: /cvsroot/mocklib/netmocklib/bldfiles/project.build,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** project.build 17 Sep 2006 16:35:13 -0000 1.4
--- project.build 10 Apr 2008 08:22:30 -0000 1.5
***************
*** 10,15 ****
<property name="ext" value=".exe" if="${type == 'exe'}" />
<property name="comp.name" value="${assembly.name}${ext}"/>
!
<loadtasks assembly="${tools}/nant-contrib/NAnt.Contrib.Tasks.dll" />
<target name="gensrc" description="Generates source code from an xsd to use for xml processing">
--- 10,17 ----
<property name="ext" value=".exe" if="${type == 'exe'}" />
<property name="comp.name" value="${assembly.name}${ext}"/>
! <property name="test.comp" value="${assembly.name}Test.dll"/>
!
<loadtasks assembly="${tools}/nant-contrib/NAnt.Contrib.Tasks.dll" />
+ <loadtasks path="${tools}/CheckFxCop" />
<target name="gensrc" description="Generates source code from an xsd to use for xml processing">
***************
*** 45,48 ****
--- 47,51 ----
</csc>
+ <echo message="libinclude=${lib}"/>
<copy todir="${assemblies}">
<fileset basedir="${lib}">
***************
*** 52,55 ****
--- 55,77 ----
</target>
+ <target name="compileTest" depends="compile" description="compiles the source file for this project">
+ <echo message="Generating ${comp.name} type=${type}"/>
+ <mkdir dir="${assemblies}"/>
+
+ <csc target="${type}" debug="true" output="${assemblies}/${test.comp}" warnaserror="true">
+ <sources basedir=".">
+ <include name="${test.input}/**/*.cs"/>
+ </sources>
+ <references basedir=".">
+ <include name="${assemblies}/**/*.dll"/>
+ <include name="${libexclude}/**/*.dll"/>
+ </references>
+ <resources basedir="${csfiles}">
+ <include name="**/*.resx"/>
+ </resources>
+ </csc>
+
+ </target>
+
<target name="winsvc.staging" depends="compile" description="Packages the webservice all up together to resemble deployment">
<mkdir dir="${winsvc.staging.bin}"/>
***************
*** 80,93 ****
</target>
! <target name="fxcop" depends="compile" description="Runs FxCop">
! <exec program="${tools}/FxCop/fxcopcmd.exe"
! commandline="/p:${tools}/FxCop/ProjectRules.FxCop /c"/>
! <!-- Unfortunately, neither fail the build on warnings -->
! <!--fxcop directOutputToConsole="true" failonerror="true">
<targets>
! <include name="${assemblies}/${comp.name}" />
</targets>
! </fxcop-->
</target>
--- 102,123 ----
</target>
! <target name="fxcop" depends="compileTest" description="Runs FxCop">
! <mkdir dir="${reports}"/>
! <fxcop directOutputToConsole="true" failonerror="true" projectFile="bldfiles/config.FxCop">
! <dependencyDirectories>
! <include name="${libexclude}"/>
! </dependencyDirectories>
<targets>
! <include name="${assemblies}/${comp.name}" />
! <include name="${assemblies}/${test.comp}" />
</targets>
! <arg value="/out:${reports}/fxcop.xml" />
! </fxcop>
!
! <checkfxcop fxcopOutput="${reports}/fxcop.xml"
! allowedCriticalErrors="${allowed.critical.errors}"
! allowedErrors="${allowed.errors}"
! allowedWarnings="${allowed.warnings}"/>
</target>
***************
*** 110,120 ****
<nunit2>
<formatter type="Plain" />
! <test assemblyname="${assemblies}/${comp.name}"/>
</nunit2>
</target>
! <target name="all" depends="winsvc.staging, fxcop, codecoverage" description="Builds everything, puts in web.staging and runs testall"/>
! <target name="clean" depends="undeployWinSvc" description="Cleans out files generated from this build file">
<delete dir="${output}" failonerror="false"/>
</target>
--- 140,150 ----
<nunit2>
<formatter type="Plain" />
! <test assemblyname="${assemblies}/${test.comp}"/>
</nunit2>
</target>
! <target name="all" depends="winsvc.staging, fxcop, testall" description="Builds everything, puts in web.staging and runs testall"/>
! <target name="clean" description="Cleans out files generated from this build file">
<delete dir="${output}" failonerror="false"/>
</target>
Index: project.properties
===================================================================
RCS file: /cvsroot/mocklib/netmocklib/bldfiles/project.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** project.properties 16 Sep 2006 04:33:35 -0000 1.1
--- project.properties 10 Apr 2008 08:22:30 -0000 1.2
***************
*** 2,8 ****
--- 2,18 ----
<project name="project.properties">
+ <!-- damn Visual Studio screws the way this would be done
+ in java like java's buildtemplate, so this needs to be
+ configured unlike java -->
+ <property name="input" value="NMockLib"/>
+ <!-- NOTE: there must be a project called
+ NMockLibTest that is created to -->
+
<!--property name="type" value="exe"-->
<property name="assembly.name" value="NMockLib"/>
<property name="namespace" value="NMockLib"/>
+ <property name="allowed.critical.errors" value="1"/>
+ <property name="allowed.errors" value="9"/>
+ <property name="allowed.warnings" value="10"/>
</project>
--- NEW FILE: config.FxCop ---
(This appears to be a binary file; contents omitted.)
Index: directory.properties
===================================================================
RCS file: /cvsroot/mocklib/netmocklib/bldfiles/directory.properties,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** directory.properties 17 Sep 2006 15:03:38 -0000 1.4
--- directory.properties 10 Apr 2008 08:22:30 -0000 1.5
***************
*** 3,10 ****
<!-- input directories -->
! <property name="input" value="input"/>
! <property name="csfiles" value="csharpcode"/>
! <property name="lib" value="${input}/libinclude"/>
! <property name="libexclude" value="${input}/libexclude"/>
<property name="config" value="${input}/config"/>
<property name="schemas" value="${input}/schemas"/>
--- 3,17 ----
<!-- input directories -->
! <property name="csfiles" value="${input}"/>
! <property name="test.input" value="${input}Test"/>
!
! <!-- These are dlls that are needed for deployment and
! must be included in the distribution -->
! <property name="lib" value="${input}/LibInclude"/>
!
! <!-- These are dlls needed for compile BUT NOT for deployment
! Examples are NUnit.dll, MockLib.dll, or frameworks or
! service dll's that you deploy to and only need for compiling -->
! <property name="libexclude" value="${input}/LibExclude"/>
<property name="config" value="${input}/config"/>
<property name="schemas" value="${input}/schemas"/>
|