lib/build/analyzers/test.step in uppercutbuild-1.3.0.0 vs lib/build/analyzers/test.step in uppercutbuild-1.4.0.0
- old
+ new
@@ -14,56 +14,39 @@
<property name="folder.code_build" value="build_output" overwrite="false" />
<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}${path.separator}${folder.app.drop}" overwrite="false" />
<property name="test.framework" value="mbunit" overwrite="false" />
- <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="true" />
+ <property name="app.ruby" value="C:\Ruby\bin\ruby.exe" overwrite="false" />
+ <property name="app.powershell" value="%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe" overwrite="false" />
- <target name="go" depends="run_tasks" />
+ <target name="go" depends="load_uppercut_assemblies, run_tasks" />
+
+ <property name="file.uppercut.assembly" value="uppercut.tasks.dll" />
+ <property name="path.uppercut.assembly" value="${dirs.current}${path.separator}${path.to.toplevel}${path.separator}${folder.build_scripts}${path.separator}${file.uppercut.assembly}" />
+ <target name="load_uppercut_assemblies">
+ <loadtasks assembly="${path.uppercut.assembly}" if="${file::exists(path.uppercut.assembly)}" />
+ </target>
<target name="run_tasks">
- <echo message="Running ${project::get-name()} tasks." />
+ <echo level="Warning" message="" />
+ <echo level="Warning" message="====================" />
+ <echo level="Warning" message="${project::get-name()}" />
+ <echo level="Warning" message="====================" />
<call target="prepare" if="${target::exists('prepare')}" />
- <call target="custom_tasks_before" if="${target::exists('custom_tasks_before')}" />
- <call target="custom_tasks_replace" if="${target::exists('custom_tasks_replace')}" />
+ <customExtension extends="${project::get-buildfile-path()}" type="pre" failonerror="${fail.build.on.error}" />
+ <customExtension extends="${project::get-buildfile-path()}" type="replace" failonerror="${fail.build.on.error}" />
<call target="run_normal_tasks" if="${not is.replaced}" />
- <call target="custom_tasks_after" if="${target::exists('custom_tasks_after')}" />
+ <customExtension extends="${project::get-buildfile-path()}" type="post" failonerror="${fail.build.on.error}" />
</target>
<target name="run_normal_tasks"
depends="run_tests"
description="Testing project for quality." />
- <target name="custom_tasks_before">
- <echo message="Running custom tasks if ${file.custom.step.before} exists." />
- <nant buildfile="${file.custom.step.before}" inheritall="true" if="${file::exists(file.custom.step.before)}" failonerror="${fail.build.on.error}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.before + '.ps1')}" failonerror="${fail.build.on.error}">
- <arg value="${path::get-full-path(file.custom.step.before + '.ps1')}" />
- </exec>
- <exec program="ruby.exe" if="${file::exists(file.custom.step.before + '.rb')}" failonerror="${fail.build.on.error}">
- <arg value="${path::get-full-path(file.custom.step.before + '.rb')}" />
- </exec>
- </target>
-
- <target name="custom_tasks_replace">
- <echo message="Running custom tasks instead of normal tasks if ${file.custom.step.replace} exists." />
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace)}" />
- <nant buildfile="${file.custom.step.replace}" inheritall="true" if="${file::exists(file.custom.step.replace)}" failonerror="${fail.build.on.error}" />
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.ps1')}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.replace + '.ps1')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.replace + '.ps1')}" />
- </exec>
- <property name="is.replaced" value="true" if="${file::exists(file.custom.step.replace + '.rb')}" />
- <exec program="ruby.exe" if="${file::exists(file.custom.step.replace + '.rb')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.replace + '.rb')}" />
- </exec>
- </target>
-
<target name="run_tests">
<nant buildfile="${dirs.current}${path.separator}mbunit2.test.step" inheritall="true" if="${test.framework=='mbunit2'}" />
<nant buildfile="${dirs.current}${path.separator}gallio.test.step" inheritall="true" if="${test.framework=='gallio'}" />
<nant buildfile="${dirs.current}${path.separator}nunit.test.step" inheritall="true" if="${test.framework=='nunit'}" />
<nant buildfile="${dirs.current}${path.separator}xunit.test.step" inheritall="true" if="${test.framework=='xunit'}" />
@@ -85,19 +68,8 @@
<nant buildfile="${dirs.current}${path.separator}xunit.test.step" target="open_results" inheritall="true" if="${test.framework=='xunit'}" />
</target>
<target name="set_normal_failure_mode">
<property name="nant.onfailure" value="fail" />
- </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}" />
- <exec program="powershell.exe" if="${file::exists(file.custom.step.after + '.ps1')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.after + '.ps1')}" />
- </exec>
- <exec program="ruby.exe" if="${file::exists(file.custom.step.after + '.rb')}" failonerror="${fail.build.on.error}" >
- <arg value="${path::get-full-path(file.custom.step.after + '.rb')}" />
- </exec>
</target>
</project>
\ No newline at end of file