Browse files

prepare for new directory structure introduced at 2b5dbddd740b in ori…

…ginal rx.
  • Loading branch information...
1 parent 8f45b38 commit 8911e1d3f169a0e378b4e237926269d9218c8fd3 @atsushieno atsushieno committed Jan 22, 2013
Showing with 69 additions and 3 deletions.
  1. +30 −3
  2. +15 −0 mono.patch
  3. +24 −0
@@ -1,16 +1,43 @@
+About this source repository
This is a partial import of for mono.
Since is massive and we only need partial source tree of it
(and due to some checkout failure on Linux [*1]), we set up another
repository for mono submodule.
This tree is hence manually imported. Though it is somewhat easy to maintain:
-we can cherry-pick changes only in Rx.NET in the
-Mostly we would not need to copy sources from the original treemanually,
-but sometimes we do when a checkout involves other directories than Rx.NET.
+we try to "cherry-pick" [*2] changes that are applied only to Rx.NET in the
+Mostly we would not need to copy sources from the original tree manually,
+but sometimes we will do so when a checkout involves other directories
+than Rx/NET.
+(Actually we had to sort of revamp the cherry-pick model when there was
+folder structural change in the Microsoft repository. But the structure
+is simpler than before and we will likely need less manual imports.)
For every original release, we should import the updates and commit to
this master, then create a branch for each release and *then* apply our
local changes (which is minimum but required) to the branch.
+[*2] not really meaning git cherry-pick which won't apply, but rather
+ applying diffs to the tree.
+Source changes
+As of OSS release 1.0, there are only two steps are required to make it
+possible to build with mono in the source repo:
+- apply mono.patch
+- cd Rx/NET/Source/Tests.System.Reactive and run ../../../../
+Actually ObservableExTest.cs cannot be compiled due to insufficient
+type inference for lambdas, so I skipped it in Mono.Reactive.Testing_test.dll.
+Note that the actual class library build is done in mono/mcs/class and
+there is a build script that generates required source list etc.
@@ -0,0 +1,15 @@
+diff --git a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+index e9715a4..86cd62e 100644
+--- a/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
++++ b/Rx.NET/Microsoft.Reactive.Testing/ReactiveAssert.cs
+@@ -8,7 +8,9 @@
+ using System.Reactive.Disposables;
+ using System.Reactive.Linq;
+-#if WINDOWS8
++#if NUNIT
++using NUnit.Framework;
++#elif WINDOWS8
+ using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
+ #else
+ using Microsoft.VisualStudio.TestTools.UnitTesting;
@@ -0,0 +1,24 @@
+using System.IO;
+using System.Text;
+foreach (var file in Directory.GetFiles (".", "*.cs", SearchOption.AllDirectories)) {
+ var text = File.ReadAllText (file);
+ if (text.Contains ("#if NUNIT"))
+ continue;
+ Console.Error.WriteLine (file + " : " + text.Contains ("using Microsoft.VisualStudio.TestTools.UnitTesting;"));
+ text = text.Replace (
+"using Microsoft.VisualStudio.TestTools.UnitTesting;",
+@"#if NUNIT
+using NUnit.Framework;
+using TestClassAttribute = NUnit.Framework.TestFixtureAttribute;
+using TestMethodAttribute = NUnit.Framework.TestAttribute;
+using TestInitializeAttribute = NUnit.Framework.SetUpAttribute;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+#endif".Replace ("\n", "\r\n"));
+ text = text.Replace ("[Timeout", "//[Timeout"); // no TimeoutAttribute in NUnit.
+ using (var tw = new StreamWriter (file, false, new UTF8Encoding (true, true)))
+ tw.Write (text);

0 comments on commit 8911e1d

Please sign in to comment.