diff options
-rw-r--r-- | main/tests/UnitTests/TestBase.cs | 15 | ||||
-rw-r--r-- | top_level_monodevelop | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/main/tests/UnitTests/TestBase.cs b/main/tests/UnitTests/TestBase.cs index 6770a3133a..c1fa813175 100644 --- a/main/tests/UnitTests/TestBase.cs +++ b/main/tests/UnitTests/TestBase.cs @@ -40,7 +40,20 @@ namespace UnitTests { static bool firstRun = true; - + static TestBase () + { + var topPath = LocateTopLevel (); + LoggingService.AddLogger (new MonoDevelop.Core.Logging.FileLogger (Path.Combine (topPath, "TestResult_LoggingService.log"))); + } + + static string LocateTopLevel () + { + var cwd = typeof (TestBase).Assembly.Location; + while (!string.IsNullOrEmpty (cwd) && !File.Exists (Path.Combine (cwd, "top_level_monodevelop"))) + cwd = Path.GetDirectoryName (cwd); + return cwd; + } + [TestFixtureSetUp] public void Simulate () { diff --git a/top_level_monodevelop b/top_level_monodevelop new file mode 100644 index 0000000000..719357e50d --- /dev/null +++ b/top_level_monodevelop @@ -0,0 +1,2 @@ +This file exists only to make sure our test suite can locate the top level of the checkout + |