diff options
author | therzok <marius.ungureanu@xamarin.com> | 2019-03-13 00:00:52 +0300 |
---|---|---|
committer | therzok <marius.ungureanu@xamarin.com> | 2019-03-18 21:18:07 +0300 |
commit | d34470aa153725d3d659586027aebd704b4bda27 (patch) | |
tree | 62ab94d9681eac32a66203d8144c63fed39087ab | |
parent | c54dc5cb49cbeeebcc551fbc5ffceab9f38a714a (diff) |
[StressTest] Don't remove log file and set it properly via process env vars
-rw-r--r-- | main/tests/StressTest/MonoDevelop.StressTest/StressTestApp.cs | 7 | ||||
-rw-r--r-- | main/tests/UserInterfaceTests/TestService.cs | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/main/tests/StressTest/MonoDevelop.StressTest/StressTestApp.cs b/main/tests/StressTest/MonoDevelop.StressTest/StressTestApp.cs index ffc066d69e..6bdf7ec1da 100644 --- a/main/tests/StressTest/MonoDevelop.StressTest/StressTestApp.cs +++ b/main/tests/StressTest/MonoDevelop.StressTest/StressTestApp.cs @@ -141,17 +141,14 @@ namespace MonoDevelop.StressTest return "/Applications/Visual Studio.app/Contents/Resources/lib/monodevelop/bin/VisualStudio.exe"; } - void SetupIdeLogFolder () + string SetupIdeLogFolder () { string rootDirectory = Path.GetDirectoryName (GetType ().Assembly.Location); string ideLogDirectory = Path.Combine (rootDirectory, "Log"); Directory.CreateDirectory (ideLogDirectory); - FoldersToClean.Add (ideLogDirectory); - string ideLogFileName = Path.Combine (ideLogDirectory, "StressTest.log"); - Environment.SetEnvironmentVariable ("MONODEVELOP_LOG_FILE", ideLogFileName); - Environment.SetEnvironmentVariable ("MONODEVELOP_FILE_LOG_LEVEL", "UpToInfo"); + return ideLogFileName; } void OnCleanUp () diff --git a/main/tests/UserInterfaceTests/TestService.cs b/main/tests/UserInterfaceTests/TestService.cs index 39af97e827..400c590d54 100644 --- a/main/tests/UserInterfaceTests/TestService.cs +++ b/main/tests/UserInterfaceTests/TestService.cs @@ -34,12 +34,14 @@ namespace UserInterfaceTests { public static AutoTestClientSession Session { get; private set; } - public static void StartSession (string file = null, string profilePath = null, string args = null) + public static void StartSession (string file = null, string profilePath = null, string logFile = null, string args = null) { Session = new AutoTestClientSession (); Session.StartApplication (file: file, args: args, environment: new Dictionary<string, string> { - { "MONODEVELOP_PROFILE", profilePath ?? Util.CreateTmpDir ("profile") } + { "MONODEVELOP_PROFILE", profilePath ?? Util.CreateTmpDir ("profile") }, + { "MONODEVEOP_LOG_FILE", logFile }, + { "MONODEVELOP_FILE_LOG_LEVEL", "UpToInfo" }, }); Session.SetGlobalValue ("MonoDevelop.Core.Instrumentation.InstrumentationService.Enabled", true); |