lib/build/analyzers/ncover.step in uppercutbuild-0.9.0.346.20100805 vs lib/build/analyzers/ncover.step in uppercutbuild-1.0.0.0.20100806

- old
+ new

@@ -2,45 +2,47 @@ <project name="NCover" default="go"> <!-- Project UppercuT - http://projectuppercut.org --> <!-- DO NOT EDIT THIS FILE - NCover uses MbUnit to run tests - find out more at http://uppercut.pbwiki.com --> <property name="build.config.settings" value="__NONE__" overwrite="false" /> <include buildfile="${build.config.settings}" if="${file::exists(build.config.settings)}" /> + <property name="path.separator" value="${string::trim(path::combine(' ', ' '))}" /> + <include buildfile="..${path.separator}csharp.functions" /> <property name="file.current.no_extension" value="ncover" /> <property name="dirs.current" value="${directory::get-parent-directory(project::get-buildfile-path())}" /> - <property name="path.to.toplevel" value="..\.." /> + <property name="path.to.toplevel" value="..${path.separator}.." /> <property name="folder.build_scripts" value="build" overwrite="false" /> <property name="folder.build_scripts_custom" value="build.custom" overwrite="false" /> - <property name="dirs.build_scripts_custom" value="${dirs.current}\${path.to.toplevel}\${folder.build_scripts_custom}\analyzers" /> + <property name="dirs.build_scripts_custom" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts_custom}${path.separator}analyzers" /> <property name="folder.code_build" value="build_output" overwrite="false" /> - <property name="dirs.build" value="${dirs.current}\${path.to.toplevel}\${folder.code_build}" /> + <property name="dirs.build" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.code_build}" /> <property name="folder.app.drop" value="${project.name}" overwrite="false" /> - <property name="dirs.build.code" value="${dirs.build}\${folder.app.drop}" overwrite="false" /> + <property name="dirs.build.code" value="${dirs.build}${path.separator}${folder.app.drop}" overwrite="false" /> <property name="folder.build_artifacts" value="build_artifacts" overwrite="false" /> - <property name="dirs.build_artifacts" value="${path::get-full-path(dirs.build)}\${folder.build_artifacts}" /> + <property name="dirs.build_artifacts" value="${path::get-full-path(dirs.build)}${path.separator}${folder.build_artifacts}" /> <property name="project.name" value="__SOLUTION_NAME_WITHOUT_SLN_EXTENSION__" overwrite="false" /> <property name="test.framework" value="mbunit" overwrite="false" /> <property name="microsoft.framework" value="net-3.5" overwrite="false" /> <property name="number.satisfactory_coverage" value="85" overwrite="false" /> <property name="fail.if_ncover_fails" value="false" overwrite="false" /> <property name="folder.references" value="lib" overwrite="false" /> - <property name="dirs.lib" value="${dirs.current}\${path.to.toplevel}\${folder.references}" overwrite="false" /> - <property name="dirs.ncover_results" value="${path::get-full-path(dirs.build_artifacts)}\ncover" /> - <property name="app.ncover.tester" value="${path::get-full-path(dirs.lib)}\MbUnit2\MbUnit.Cons.exe" overwrite="false" /> - <property name="app.ncover" value="${path::get-full-path(dirs.lib)}\NCover\NCover.Console.exe" overwrite="false" /> - <property name="app.ncover.explorer" value="${path::get-full-path(dirs.lib)}\NCover\NCoverExplorer.Console.exe" overwrite="false" /> - <property name="file.ncover_results" value="${dirs.ncover_results}\${project.name}.ncover.xml" /> - <property name="file.ncover_log" value="${dirs.ncover_results}\${project.name}.ncover.log" /> + <property name="dirs.lib" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.references}" overwrite="false" /> + <property name="dirs.ncover_results" value="${path::get-full-path(dirs.build_artifacts)}${path.separator}ncover" /> + <property name="app.ncover.tester" value="${path::get-full-path(dirs.lib)}${path.separator}MbUnit2${path.separator}MbUnit.Cons.exe" overwrite="false" /> + <property name="app.ncover" value="${path::get-full-path(dirs.lib)}${path.separator}NCover${path.separator}NCover.Console.exe" overwrite="false" /> + <property name="app.ncover.explorer" value="${path::get-full-path(dirs.lib)}${path.separator}NCover${path.separator}NCoverExplorer.Console.exe" overwrite="false" /> + <property name="file.ncover_results" value="${dirs.ncover_results}${path.separator}${project.name}.ncover.xml" /> + <property name="file.ncover_log" value="${dirs.ncover_results}${path.separator}${project.name}.ncover.log" /> <property name="file.xml.code_coverage_results" value="${project.name}.CodeCoverageSummary-results.xml" /> <property name="file.html.code_coverage_results" value="${project.name}.CodeCoverageSummary-results.html" /> <property name="tests.excluded_categories.comma_separated" value="Database,Integration,Slow,NotWorking" overwrite="false" /> <property name="test.args" value="" /> <property name="test.args" value="/rt:Text /rnf:mbUnit /rf:&quot;${dirs.ncover_results}&quot; /ec:${tests.excluded_categories.comma_separated}" if="${test.framework=='mbunit2'}" /> - <property name="test.args" value="/xml:&quot;${dirs.ncover_results}\nunit-results.xml&quot; /nologo /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" /> + <property name="test.args" value="/xml:&quot;${dirs.ncover_results}${path.separator}nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" /> <!--property name="test.args" value="/xml:&quot;${dirs.ncover_results}\nunit-results.xml&quot; /nologo /framework=${microsoft.framework} /exclude:${tests.excluded_categories.comma_separated}" if="${test.framework=='nunit'}" /--> - <property name="file.custom.step.before" value="${dirs.build_scripts_custom}\${file.current.no_extension}.pre.step" /> - <property name="file.custom.step.after" value="${dirs.build_scripts_custom}\${file.current.no_extension}.post.step" /> - <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}\${file.current.no_extension}.replace.step" /> + <property name="file.custom.step.before" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.pre.step" /> + <property name="file.custom.step.after" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.post.step" /> + <property name="file.custom.step.replace" value="${dirs.build_scripts_custom}${path.separator}${file.current.no_extension}.replace.step" /> <property name="is.replaced" value="false" /> <property name="fail.build.on.error" value="false" /> <target name="go" depends="run_tasks" if="${file::exists(app.ncover) and test.framework !='none'}" /> @@ -93,20 +95,20 @@ <echo message="Getting test dlls based on name in directory ${path::get-full-path(dirs.build.code)}." /> <property name="dll.names" value="" /> <foreach item="File" property="dll.filename"> <in> <items> - <exclude name="${dirs.build.code}\lib\**" /> - <exclude name="${dirs.build.code}\**\*Database*dll" /> - <exclude name="${dirs.build.code}\**\*.Integration*dll" /> - <exclude name="${dirs.build.code}\**\TestFu.dll" /> - <include name="${dirs.build.code}\**\*Test*dll" /> - <include name="${dirs.build.code}\**\*Spec*dll" /> + <exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}*Database*dll" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}*.Integration*dll" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" /> + <include name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" /> + <include name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" /> </items> </in> <do> - <property name="dll.names" value="${dll.names + ' ' + string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\','') + ''}" /> + <property name="dll.names" value="${dll.names + ' ' + string::replace(string::replace(dll.filename,path::get-full-path(dirs.build.code) + '\',''),'\',path.separator) + ''}" /> </do> </foreach> <property name="dlls.test" value="${dll.names}" /> <echo message="Running NCover against these test dlls - ${dlls.test}." /> @@ -125,14 +127,15 @@ logFile="${file.ncover_log}" excludeAttributes="CoverageExcludeAttribute" failonerror="false" verbose="true"> <assemblies basedir="${dirs.build.code}"> - <exclude name="${dirs.build.code}\**\TestFu.dll" /> - <exclude name="${dirs.build.code}\**\*Test*dll" /> - <exclude name="${dirs.build.code}\**\*Spec*dll" /> - <include name="${dirs.build.code}\**\${project.name}*.dll" /> + <exclude name="${dirs.build.code}${path.separator}lib${path.separator}**" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}TestFu.dll" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}*Test*dll" /> + <exclude name="${dirs.build.code}${path.separator}**${path.separator}*Spec*dll" /> + <include name="${dirs.build.code}${path.separator}**${path.separator}${project.name}*.dll" /> </assemblies> </ncover> </target> <target name="ncover_explorer" depends="ncover" if="${file::exists(app.ncover.explorer)}" > @@ -163,16 +166,11 @@ </exclusions> </ncoverexplorer> </target> <target name="open_results"> - <echo message="Opening results at ${path::get-full-path(dirs.ncover_results)}\${file.html.code_coverage_results}."/> - <exec - spawn="true" - program="${environment::get-folder-path('ProgramFiles')}\Internet Explorer\iexplore.exe" - commandline="${path::get-full-path(dirs.ncover_results)}\${file.html.code_coverage_results}" - > - </exec> + <echo message="Opening results - ${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" /> + <results display="${path::get-full-path(dirs.ncover_results) + path.separator + file.html.code_coverage_results}" /> </target> <target name="custom_tasks_after"> <echo message="Running custom tasks if ${file.custom.step.after} exists." /> <nant buildfile="${file.custom.step.after}" inheritall="true" if="${file::exists(file.custom.step.after)}" failonerror="${fail.build.on.error}" /> \ No newline at end of file