lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [Lucene.Net] svn commit: r1128815 - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g: .gitignore build/scripts/build.sh build/scripts/build.xml lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config
Date Sun, 29 May 2011 04:28:33 GMT
Author: mherndon
Date: Sun May 29 04:28:33 2011
New Revision: 1128815

URL: http://svn.apache.org/viewvc?rev=1128815&view=rev
Log:
LUCENENET-400 fixing up nunit and build scripts to execute from mono.  The are some issues
with the tests like inconsistent usage of how the tests are targeting the temp directory.

Modified:
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh   (contents, props
changed)
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore?rev=1128815&r1=1128814&r2=1128815&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore Sun May 29 04:28:33 2011
@@ -8,3 +8,5 @@ obj
 *.bak
 *.vs10x
 *.VisualState.xml
+*.userprefs
+*.pidb

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh?rev=1128815&r1=1128814&r2=1128815&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh Sun May 29 04:28:33
2011
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # 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.
@@ -15,10 +15,33 @@
 # limitations under the License.
 
 TARGETS="all"
-echo "$1"
+BuildArea="all"
+Configuration="debug"
 if [ -n "$1" ] 
 		then 
 			TARGETS=$1
 fi
+if [ "$#" -gt "1" ]
+		then
+			TARGETS=${!#}
+fi
+if [ $# -eq 2 ]
+		then
+			BuildArea="$1"
+fi 
+if [ $# -eq 3 ]
+		then
+			BuildArea="$1"
+			Configuration="$2"
+fi
+
+echo "commands will target projects: $BuildArea"
+echo "commands will target the configuration: $Configuration"
+export $BuildArea
+export $Configuration
+
+ROOT=$(dirname $0)
+export NETFRAMEWORK="mono"
+export TEMP=$ROOT/tmp
 
-MONO_IOMAP=case xbuild build.xml /t:$TARGETS
\ No newline at end of file
+MONO_IOMAP=case xbuild $ROOT/build.xml /t:$TARGETS
\ No newline at end of file

Propchange: incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml?rev=1128815&r1=1128814&r2=1128815&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml Sun May 29 04:28:33
2011
@@ -18,39 +18,74 @@
  
 -->
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
-  <PropertyGroup>
-    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
-    <BuildAllSolution>$(MSBuildProjectDirectory)\..\vs2010\test\Contrib.All.Test.sln</BuildAllSolution>
-    <BuildLuceneSolution>$(MSBuildProjectDirectory)\..\vs2010\test\Lucene.Net.Test.sln</BuildLuceneSolution>
-  </PropertyGroup>
- 
+	
+	
+  	<PropertyGroup>
+		<Configuration Condition="'$(Configuration)' == '' Or '$(Configuration)' == 'debug'">Debug</Configuration>
+		<Configuration Condition="'$(Configuration)' == 'release'">Release</Configuration>
+		<BuildArea Condition="'$(BuildArea)' == ''">all</BuildArea>
+		<LuceneFolder>core</LuceneFolder>
+		<ContribFolder>contrib</ContribFolder>
+		<BinFolder>bin</BinFolder>
+		<SourceFolder>src</SourceFolder>
+		<TestFolder>test</TestFolder>
+		<LibFolder>lib</LibFolder>
+		<!-- This path is a bit redundant -->
+		<NUnitBinFolder>lib\NUnit.org\NUnit\2.5.9\bin\net-2.0\</NUnitBinFolder>
+		<TempFolder>$(TEMP)</TempFolder>
+		<BuildFolder>$(MSBuildProjectDirectory)</BuildFolder>
+		<RootFolder>$(MSBuildProjectDirectory)\..\..\</RootFolder>
+		<Executable></Executable>
+	 </PropertyGroup>
+	
+	<!-- To Execute commands on mono like running nunit, it requires running through the
program mono.exe -->
+	<PropertyGroup Condition="'$(NETFRAMEWORK)' == 'mono'">
+		<Executable>mono</Executable>
+	</PropertyGroup>
+
+	<PropertyGroup>
+		<LuceneSourceFolder>$(RootFolder)$(SourceFolder)\$(LuceneFolder)\</LuceneSourceFolder>
+		<LuceneTestFolder>$(RootFolder)$(TestFolder)\$(LuceneFolder)\</LuceneTestFolder>
+		<LuceneBinFolder>$(RootFolder)$(BinFolder)\$(LuceneFolder)\</LuceneBinFolder>
+		<ContribSourceFolder>$(RootFolder)$(SourceFolder)\$(ContribFolder)\</ContribSourceFolder>
+		<ContribTestFolder>$(RootFolder)$(TestFolder)\$(ContribFolder)\</ContribTestFolder>
+		<ContribBinFolder>$(RootFolder)$(BinFolder)\$(ContribFolder)\</ContribBinFolder>
+	</PropertyGroup>
+
 
-  <PropertyGroup>
-  	<BinFolder>$(MSBuildProjectDirectory)\..\..\bin</BinFolder>
-    <CoreFolder>core</CoreFolder>
-    <ContribFolder>contrib</ContribFolder>
-    <DemoFolder>demo</DemoFolder>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <BinFiles Include="$(BinFolder)\$(CoreFolder)\$(Configuration)\*"/>
-    <BinFiles Include="$(BinFolder)\$(ContribFolder)\**\$(Configuration)\*.*"/>
-    <BinFiles Include="$(BinFolder)\$(DemoFolder)\**\$(Configuration)\*.*"/>
-  </ItemGroup>
+
+  	<ItemGroup Condition="'$(BuildArea)' == 'lucene' Or '$(BuildArea)' == 'all'">
+		<BuildFiles Include="\$(LuceneBinFolder)**\*" />
+		<TestFiles Include="\$(LuceneBinFolder)**\*.Test.dll" />
+		<SubFiles Include="\$(LuceneBinFolder)$(Configuration)\**\*.*" Exclude="\$(LuceneBinFolder)$(Configuration)\*.*"
/>
+		<ProjectFiles Include="\$(LuceneSourceFolder)\**\*.csproj" />
+		<ProjectFiles Include="\$(LuceneTestFolder)\**\*.csproj" />
+	</ItemGroup>
+	
+	<ItemGroup>
+	    <SubFolders Include="@(SubFiles->'%(RootDir)%(Directory)')" />
+		<NUnitFolder Include="\$(RootFolder)$(NunitBinFolder)" />
+	</ItemGroup>
+
+	<ItemGroup>
+	    <BuildFolders Include="@(SubFolders->'%(RootDir)%(Directory)')" Exclude="\$(LuceneBinFolder)"
/>
+	</ItemGroup>
   
-  <Target Name="clean-all">
-    <Delete Files="@(BinFiles)" />
-  </Target>
+	<Target Name="clean">
+		<Exec Command="echo %(BuildFolders.FullPath)" WorkingDirectory="/" />
+		<Delete Files="@(BuildFiles)" /> 
+		<!-- 
+		TODO: fix this
+		<RemoveDir Directories="@(BuildFolders)" /> -->
+	</Target>
   
-  <Target Name="build-all">
-    <MSBuild Projects="$(BuildAllSolution)" ContinueOnError="false"  Properties="Configuration=$(Configuration)"/>
-  </Target>
+ 	<Target Name="build">
+		<MSBuild Projects="@(ProjectFiles)" Properties="Configuration=$(Configuration)" />
+	</Target>
   
-  <Target Name="lucene">
-    <MSBuild Projects="$(BuildLuceneSolution)" ContinueOnError="false"  Properties="Configuration=$(Configuration)"/>
-  </Target>
-
-  <Target Name="all">
-    <CallTarget Targets="clean-all;build-all" />
-  </Target>
+	<Target Name="test">
+		<MakeDir Condition="!Exists('$(TEMP)')" Directories="$(TEMP)" />
+		<Exec Command="$(Executable) %(NUnitFolder.FullPath)nunit-console.exe -nologo @(TestFiles)"
/>
+	</Target>
+
 </Project>
\ No newline at end of file

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config?rev=1128815&r1=1128814&r2=1128815&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-console.exe.config
Sun May 29 04:28:33 2011
@@ -1,6 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-
+<startup> 
+	<supportedRuntime version="v4.0.30319" /> 
+</startup>
   <runtime>
     <!-- We need this so test exceptions don't crash NUnit -->
     <legacyUnhandledExceptionPolicy enabled="1" />

Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config?rev=1128815&r1=1128814&r2=1128815&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config
(original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/lib/NUnit.org/NUnit/2.5.9/bin/net-2.0/nunit-x86.exe.config
Sun May 29 04:28:33 2011
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
+
   <!--
      Application settings for NUnit-gui.exe. Do NOT put settings
 	 for use by your tests here.



Mime
View raw message