You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by bo...@apache.org on 2016/09/11 13:07:24 UTC

svn commit: r1760248 - in /logging/log4net/trunk/tests: lib/prerequisites.txt nant.build

Author: bodewig
Date: Sun Sep 11 13:07:23 2016
New Revision: 1760248

URL: http://svn.apache.org/viewvc?rev=1760248&view=rev
Log:
download NUnit before running the tests

Modified:
    logging/log4net/trunk/tests/lib/prerequisites.txt
    logging/log4net/trunk/tests/nant.build

Modified: logging/log4net/trunk/tests/lib/prerequisites.txt
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/lib/prerequisites.txt?rev=1760248&r1=1760247&r2=1760248&view=diff
==============================================================================
--- logging/log4net/trunk/tests/lib/prerequisites.txt (original)
+++ logging/log4net/trunk/tests/lib/prerequisites.txt Sun Sep 11 13:07:23 2016
@@ -1,37 +1,7 @@
 Prerequisites for log4net tests
 ===============================
 
-
-The nunit.framework.dll assembly version 2.2.7 is required to build 
-the log4net tests.
-
-NAnt 0.85 includes the 2.2.7 version of the nunit.framework.dll.
-
-The nunit.framework.dll is available as different builds for each 
-version of the .net runtime. To build multiple versions of the
-log4net tests you will need several different copies of the
-nunit.framework.dll.
-
-The log4net tests are currently built for the following runtimes:
-
-Microsoft .NET Framework 1.0
-Microsoft .NET Framework 1.1
-Microsoft .NET Framework 2.0
-Mono Framework 2.0
-
-Under the tests/lib directory you must create the following directory
-structure containing the nunit.framework.dll assembly built for the
-appropriate version of the runtime:
-
-lib\
-  net\
-    1.0\
-      nunit.framework.dll
-    1.1\
-      nunit.framework.dll
-    2.0\
-      nunit.framework.dll
-  mono\
-    2.0\
-      nunit.framework.dll
-    
+The nunit.framework.dll assembly version 2.6.4 is required to build
+the log4net tests. The build process will download NUnit and place the
+framework dll inside the lib directory corresponding to the current
+framework.

Modified: logging/log4net/trunk/tests/nant.build
URL: http://svn.apache.org/viewvc/logging/log4net/trunk/tests/nant.build?rev=1760248&r1=1760247&r2=1760248&view=diff
==============================================================================
--- logging/log4net/trunk/tests/nant.build (original)
+++ logging/log4net/trunk/tests/nant.build Sun Sep 11 13:07:23 2016
@@ -25,8 +25,19 @@ limitations under the License.
     <call target="set-build-configuration" />
     <call target="set-framework-configuration" />
 
+    <target name="install-nunit">
+      <if test="${not file::exists('lib/' + framework::get-family(framework::get-target-framework()) + '/' + version::to-string(framework::get-version(framework::get-target-framework())) + '/nunit.framework.dll')}">
+	<get src="https://github.com/nunit/nunitv2/releases/download/2.6.4/NUnit-2.6.4.zip"
+	     dest="${environment::get-folder-path('InternetCache')}/nunit.zip"/>
+	<unzip zipfile="${environment::get-folder-path('InternetCache')}/nunit.zip"
+	       todir="${environment::get-folder-path('InternetCache')}/nunit.tmp"/>
+	<copy file="${environment::get-folder-path('InternetCache')}/nunit.tmp/NUnit-2.6.4/bin/nunit.framework.dll"
+	      todir="lib/${framework::get-family(framework::get-target-framework())}/${version::to-string(framework::get-version(framework::get-target-framework()))}"/>
+      </if>
+    </target>
+
     <!-- Target for compiling the tests on all frameworks -->
-    <target name="compile-all" description="Builds all log4net tests">
+    <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')}">
@@ -742,7 +753,8 @@ limitations under the License.
 
     <!-- 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">
+    <target name="runtests" description="Runs log4net tests"
+	    depends="install-nunit">
 		<!--
 			Because the <nunit2> task does not support multiple frameworks through the 
 			nant.settings.currentframework setting we cannot just run the tests for each framework.