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: r1142080 - in /incubator/lucene.net/branches/Lucene.Net_2_9_4g: .gitignore build/scripts/build.sh build/scripts/build.xml
Date Fri, 01 Jul 2011 20:29:26 GMT
Author: mherndon
Date: Fri Jul  1 20:29:26 2011
New Revision: 1142080

URL: http://svn.apache.org/viewvc?rev=1142080&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
    incubator/lucene.net/branches/Lucene.Net_2_9_4g/build/scripts/build.xml

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=1142080&r1=1142079&r2=1142080&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/.gitignore Fri Jul  1 20:29:26 2011
@@ -9,5 +9,4 @@ obj
 *.vs10x
 *.VisualState.xml
 *.userprefs
-*.pidb
-
+*.pidb
\ No newline at end of file

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=1142080&r1=1142079&r2=1142080&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 Fri Jul  1 20:29:26
2011
@@ -1,9 +1,4 @@
-<<<<<<< HEAD
 #!/bin/bash
-
-=======
-#!/bin/sh
->>>>>>> LUCENENET-400 adding the code that excutes xbuild for mono using
a shell script.  tweaking the build.xml to work for both msbuild & xbuild. expliciting
naming the target 'lucene' for the lucene only build, instead being too generic and calling
it 'build'
 # 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.
@@ -22,12 +17,10 @@
 TARGETS="all"
 BuildArea="all"
 Configuration="debug"
-
 if [ -n "$1" ] 
 		then 
 			TARGETS=$1
 fi
-
 if [ "$#" -gt "1" ]
 		then
 			TARGETS=${!#}

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=1142080&r1=1142079&r2=1142080&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 Fri Jul  1 20:29:26
2011
@@ -18,38 +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>
-    <BuildSolution>$(MSBuildProjectDirectory)\..\vs2010\test\Lucene.Net.Test.sln</BuildSolution>
-  </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 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">
-    <ItemGroup>
-      <BinFiles Include="$(BinFolder)\$(CoreFolder)\$(Configuration)\*"/>
-      <BinFiles Include="$(BinFolder)\$(ContribFolder)\**\$(Configuration)\*.*"/>
-      <BinFiles Include="$(BinFolder)\$(DemoFolder)\**\$(Configuration)\*.*"/>
-    </ItemGroup>
-    <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="build">
-    <MSBuild Projects="$(BuildSolution)" 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



Mime
View raw message