<?xml version="1.0" encoding="utf-8" ?>
<project name="GallioTestRunner" default="go">
<!-- Project UppercuT - http://projectuppercut.org -->
<!-- DO NOT EDIT THIS FILE - This follows a convention for testing with Integration tests being separated from Unit 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="dirs.build" value="${directory::get-parent-directory(project::get-buildfile-path())}\..\..\build_output" />
<property name="dirs.build_artifacts" value="${dirs.build}\build_artifacts" overwrite="false" />
<property name="dirs.test_results" value="${dirs.build_artifacts}\gallio" overwrite="false" />
<property name="file.test_results" value="gallio-results" overwrite="false" />
<property name="time.limit.in.seconds" value="240" /> <!-- 4 minutes -->
<target name="go" depends="cleanup, run_tests" description="Tests" />
<target name="cleanup">
<echo message="Removing and adding ${dirs.test_results}."/>
<delete dir="${dirs.test_results}" failonerror="false" />
<mkdir dir="${dirs.test_results}" />
</target>
<target name="load_tasks">
<echo message="Loading Gallio Nant Tasks from Program Files." />
<loadtasks assembly="C:\Program Files (x86)\Gallio\bin\Gallio.NAntTasks.dll" if="${file::exists('C:\Program Files (x86)\Gallio\bin\Gallio.NAntTasks.dll')}" />
<loadtasks assembly="C:\Program Files\Gallio\bin\Gallio.NAntTasks.dll" if="${file::exists('C:\Program Files\Gallio\bin\Gallio.NAntTasks.dll')}" />
</target>
<target name="run_tests" depends="cleanup,load_tasks" description="Running Unit Tests">
<echo message="Running tests using Gallio and putting results in ${dirs.test_results}."/>
<gallio working-directory="${dirs.build}"
report-types="Html;Xml;Text"
report-directory="${dirs.test_results}"
report-name-format="${file.test_results}"
show-reports="false"
failonerror="true"
verbosity="Normal"
echo-results="true"
run-time-limit="${time.limit.in.seconds}"
filter="exclude Category:Database or Category:Integration or Category:Slow or Category:NotWorking or Categroy:Ignore or Category:database or Category:integration or Category:slow or Category:notworking or Categroy:ignore"
>
<files>
<exclude name="${dirs.build}\*Database*dll" />
<exclude name="${dirs.build}\*.Integration*dll" />
<exclude name="${dirs.build}\TestFu.dll" />
<include name="${dirs.build}\*Test*dll" />
<include name="${dirs.build}\*.Specs*dll" />
</files>
</gallio>
</target>
<target name="run_all_tests" depends="cleanup,load_tasks" description="Running All Unit Tests">
<echo message="Running all tests (including integration tests) using Gallio and putting results in ${dirs.test_results}."/>
<gallio working-directory="${dirs.build}"
report-types="Html;Xml;Text"
report-directory="${dirs.test_results}"
report-name-format="${file.test_results}"
show-reports="false"
failonerror="true"
verbosity="Normal"
echo-results="true"
run-time-limit="${time.limit.in.seconds}"
>
<files>
<exclude name="${dirs.build}\TestFu.dll" />
<include name="${dirs.build}\*Test*dll" />
<include name="${dirs.build}\*.Specs*dll" />
</files>
</gallio>
</target>
<target name="open_results">
<echo message="Opening results at ${path::get-full-path(dirs.test_results)}\${file.test_results}.html."/>
<exec
spawn="true"
program="${environment::get-folder-path('ProgramFiles')}\Internet Explorer\iexplore.exe"
commandline="${path::get-full-path(dirs.test_results)}\${file.test_results}.html"
>
</exec>
</target>
</project>