blob: d18b3d174cebc1fd9a3988598ef4b75c9c8ecab3 [file] [log] [blame]
<?xml version="1.0" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to you under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="log4net-tests" default="runtests" xmlnds="http://tempuri.org/nant-vs.xsd">
<property name="log4net.basedir" value="../" readonly="false" />
<property name="project.build.config" value="debug" readonly="false" />
<property name="project.build.package" value="false" readonly="false" />
<!-- Include log4net helpers -->
<include buildfile="${log4net.basedir}/log4net.include" />
<!-- Targets that should always be executed -->
<call target="set-build-configuration" />
<target name="install-nunit">
<if test="${not file::exists('lib/${current.build.configuration.dir}/nunit.framework.dll')}">
<get src="https://github.com/nunit/nunitv2/releases/download/2.6.4/NUnit-2.6.4.zip"
dest=".tmp-nunit.zip"/>
<unzip zipfile=".tmp-nunit.zip"
todir=".tmp-nunit"/>
<copy file=".tmp-nunit/NUnit-2.6.4/bin/nunit.framework.dll"
todir="lib/${current.build.configuration.dir}"/>
<delete file=".tmp-nunit.zip"/>
<delete dir=".tmp-nunit"/>
</if>
</target>
<!-- Target for compiling the tests on all frameworks -->
<target name="compile-all" description="Builds all log4net tests" >
<echo message="Compiling all runtime configurations for the ${current.build.config} build configuration." />
<if test="${framework::exists('net-1.0')}">
<call target="compile-net-1.0" />
</if>
<if test="${not framework::exists('net-1.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 1.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 1.0 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('net-2.0')}">
<call target="compile-net-2.0" />
</if>
<if test="${not framework::exists('net-2.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 2.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 2.0 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('net-1.1')}">
<call target="compile-net-1.1" />
</if>
<if test="${not framework::exists('net-1.1')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 1.1 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 1.1 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('mono-2.0')}">
<call target="compile-mono-2.0" />
</if>
<if test="${not framework::exists('mono-2.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The Mono Framework 2.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The Mono Framework 2.0 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('mono-3.5')}">
<call target="compile-mono-3.5" />
</if>
<if test="${not framework::exists('mono-3.5')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The Mono Framework 3.5 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The Mono Framework 3.5 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('mono-4.0')}">
<call target="compile-mono-4.0" />
</if>
<if test="${not framework::exists('mono-4.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The Mono Framework 4.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The Mono Framework 4.0 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('net-3.5')}">
<call target="compile-net-3.5" />
<call target="compile-net-3.5-cp" />
</if>
<if test="${not framework::exists('net-3.5')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 3.5 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 3.5 is not available. Build skipped." />
</if>
</if>
<if test="${framework::exists('net-4.0')}">
<call target="compile-net-4.0" />
<call target="compile-net-4.0-cp" />
<call target="compile-net-4.5" />
</if>
<if test="${not framework::exists('net-4.0')}">
<if test="${property::exists('project.build.package') and project.build.package}">
<fail message="The .NET Framework 4.0 is not available." />
</if>
<if test="${not(property::exists('project.build.package') and project.build.package)}">
<echo message="The .NET Framework 4.0 is not available. Build skipped." />
</if>
</if>
</target>
<!-- Target for compiling the tests on net-1.0 -->
<target name="compile-net-1.0" description="Builds log4net tests .NET Framework 1.0 version" depends="set-net-1.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<!-- Target for compiling the tests on net-1.1 -->
<target name="compile-net-1.1" description="Builds log4net tests .NET Framework 1.1 version" depends="set-net-1.1-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-2.0" description="Builds log4net tests .NET Framework 2.0 version" depends="set-net-2.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-mono-2.0" description="Builds log4net tests Mono Framework 2.0 version" depends="set-mono-2.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<!-- include name="mscorlib.dll" / -->
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-mono-3.5" description="Builds log4net tests Mono Framework 3.5 version" depends="set-mono-3.5-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<!-- include name="mscorlib.dll" / -->
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-mono-4.0" description="Builds log4net tests Mono Framework 4.0 version" depends="set-mono-4.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc noconfig="true" warnaserror="false" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<!-- include name="mscorlib.dll" / -->
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-3.5" description="Builds log4net tests .NET Framework 3.5 version" depends="set-net-3.5-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-3.5-cp" description="Builds log4net tests .NET Framework 3.5 Client Profile version" depends="set-net-3.5-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-4.0" description="Builds log4net tests .NET Framework 4.0 version" depends="set-net-4.0-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-4.0-cp" description="Builds log4net tests .NET Framework 4.0 Client Profile version" depends="set-net-4.0-cp-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}-cp/${framework::get-version(framework::get-target-framework())}/*.dll" frompath="false" />
</references>
</csc>
</target>
<target name="compile-net-4.5" description="Builds log4net tests .NET Framework 4.5 version" depends="set-net-4.5-runtime-configuration, check-log4net-basedir, clean-current-bin-dir, check-log4net-assembly, install-nunit">
<!-- copy log4net build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/${current.bin.dir}">
<include name="*.*" />
</fileset>
</copy>
<!-- copy referenced libraries to build output -->
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/tests/lib">
<include name="/*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/4.5/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="lib/${framework::get-family(framework::get-target-framework())}/4.5">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/4.5/${current.build.config}">
<include name="*.dll" />
</fileset>
</copy>
<copy todir="${current.bin.dir}">
<fileset basedir="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/4.5">
<include name="*.dll" />
</fileset>
</copy>
<csc nostdlib="true" noconfig="true" warnaserror="true" target="library" debug="${current.build.debug}" define="${current.build.defines.csc}" output="${current.bin.dir}/log4net.Tests.dll">
<sources basedir="${log4net.basedir}/tests/src">
<include name="**/*.cs" />
<include name="../../src/AssemblyVersionInfo.cs" />
</sources>
<references defaultexcludes="true">
<include name="mscorlib.dll" />
<include name="System.dll" />
<include name="System.Configuration.dll" />
<include name="System.Core.dll" />
<include name="System.Data.dll" />
<include name="System.Web.dll" />
<include name="System.Xml.dll" />
<include name="System.Runtime.Remoting.dll" />
<include name="${current.bin.dir}/log4net.dll" frompath="false" />
<!-- allow for third party assemblies to be referenced by just storing them in the lib/<framework>/<framework version>/<build configuration> directory -->
<include name="lib/${framework::get-family(framework::get-target-framework())}/4.5/${current.build.config}/*.dll" frompath="false" />
<include name="lib/${framework::get-family(framework::get-target-framework())}/4.5/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/4.5/${current.build.config}/*.dll" frompath="false" />
<include name="${log4net.basedir}/lib/${framework::get-family(framework::get-target-framework())}/4.5/*.dll" frompath="false" />
</references>
</csc>
</target>
<!-- Currently we cannot run the tests in the environment of the target framework only in the host framework -->
<target name="runtests" description="Runs log4net tests">
<!--
Because the <nunit2> task does not support multiple frameworks through the
nant.settings.currentframework setting we cannot just run the tests for each framework.
Only the tests for the current framework are run.
<if test="${framework::exists('net-1.0')}">
<call target="runtests-net-1.0" />
</if>
<if test="${framework::exists('net-1.1')}">
<call target="runtests-net-1.1" />
</if>
<if test="${framework::exists('net-2.0')}">
<call target="runtests-net-2.0" />
</if>
<if test="${framework::exists('mono-2.0')}">
<call target="runtests-mono-2.0" />
</if>
-->
<if test="${target::exists('runtests-' + nant.settings.currentframework)}">
<echo message="Running tests for ${framework::get-target-framework()}" />
<call target="runtests-${nant.settings.currentframework}" />
</if>
</target>
<target name="runtests-net-1.0" description="Runs log4net tests on .NET Framework 1.0 version" depends="compile-net-1.0">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-1.1" description="Runs log4net tests on .NET Framework 1.1 version" depends="compile-net-1.1">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-2.0" description="Runs log4net tests on .NET Framework 2.0 version" depends="compile-net-2.0">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-mono-2.0" description="Runs log4net tests on Mono Framework 2.0 version" depends="compile-mono-2.0">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-mono-3.5" description="Runs log4net tests on Mono Framework 3.5 version" depends="compile-mono-3.5">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-mono-4.0" description="Runs log4net tests on Mono Framework 4.0 version" depends="compile-mono-4.0">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-3.5" description="Runs log4net tests on .NET Framework 3.5 version" depends="compile-net-3.5">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-3.5-cp" description="Runs log4net tests on .NET Framework 3.5 Client Profile version" depends="compile-net-3.5-cp">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-4.0" description="Runs log4net tests on .NET Framework 4.0 version" depends="compile-net-4.0">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-4.0-cp" description="Runs log4net tests on .NET Framework 4.0 Client Profile version" depends="compile-net-4.0-cp">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
<target name="runtests-net-4.5" description="Runs log4net tests on .NET Framework 4.5 version" depends="compile-net-4.5">
<nunit2 failonerror="false">
<formatter type="Xml" usefile="true" extension=".nunit.xml" outputdir="${current.bin.dir}" />
<test assemblyname="${current.bin.dir}/log4net.Tests.dll" />
</nunit2>
</target>
</project>