Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan@xamarin.com>2016-02-16 12:48:32 +0300
committerAlan McGovern <alan@xamarin.com>2016-02-16 12:49:21 +0300
commit5a536d41d4bc50acc575949cb7d4a56eb269877b (patch)
tree5e52f7bc34e6c53b88da773350c500d2ffeeb9ed
parentec21a54516f0bf460f77e271de6df4708f878782 (diff)
[tests] Capture the logging service output for our tests
This will make it possible to figure out what is going on when tests fail.
-rw-r--r--main/tests/UnitTests/TestBase.cs15
-rw-r--r--top_level_monodevelop2
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
+