Fix two mmp/mtouch tests after the mcs->csc default change

This commit is contained in:
Alexander Köplinger 2019-03-28 00:16:53 +01:00
Родитель d9ea3f6928
Коммит d91769a5a3
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -217,7 +217,7 @@ namespace Xamarin.MMP.Tests
TI.RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/csc", sb, "b"); TI.RunAndAssert ("/Library/Frameworks/Mono.framework/Commands/csc", sb, "b");
File.SetAttributes (assemblyPath, FileAttributes.ReadOnly); File.SetAttributes (assemblyPath, FileAttributes.ReadOnly);
File.SetAttributes (assemblyPath + ".mdb", FileAttributes.ReadOnly); File.SetAttributes (Path.ChangeExtension (assemblyPath, ".pdb"), FileAttributes.ReadOnly);
// build project referencing a.dll // build project referencing a.dll
TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir) TI.UnifiedTestConfig test = new TI.UnifiedTestConfig (tmpDir)

Просмотреть файл

@ -3514,7 +3514,7 @@ public partial class NotificationService : UNNotificationServiceExtension
// Create a sample exe // Create a sample exe
var code = "public class TestApp { static void Main () { System.Console.WriteLine (typeof (ObjCRuntime.Runtime).ToString ()); } }"; var code = "public class TestApp { static void Main () { System.Console.WriteLine (typeof (ObjCRuntime.Runtime).ToString ()); } }";
var exe = MTouch.CompileTestAppExecutable (tmp, code, "/debug:full"); var exe = MTouch.CompileTestAppExecutable (tmp, code, "/debug:full", use_csc: false);
mtouch.AppPath = mtouch.CreateTemporaryDirectory (); mtouch.AppPath = mtouch.CreateTemporaryDirectory ();
mtouch.RootAssembly = exe; mtouch.RootAssembly = exe;
@ -3531,12 +3531,12 @@ public partial class NotificationService : UNNotificationServiceExtension
System.Threading.Thread.Sleep (1000); // HFS does not have sub-second timestamp resolution, so make sure the timestamps actually change... System.Threading.Thread.Sleep (1000); // HFS does not have sub-second timestamp resolution, so make sure the timestamps actually change...
// Recompile the exe, adding only whitespace. This will only change the debug files // Recompile the exe, adding only whitespace. This will only change the debug files
MTouch.CompileTestAppExecutable (tmp, "\n\n" + code + "\n\n", "/debug:full"); MTouch.CompileTestAppExecutable (tmp, "\n\n" + code + "\n\n", "/debug:full", use_csc: false);
// Rebuild the app // Rebuild the app
mtouch.AssertExecute (MTouchAction.BuildSim); mtouch.AssertExecute (MTouchAction.BuildSim);
// The mdb files should be updated, but the exe should not. // The pdb files should be updated, but the exe should not.
Assert.AreEqual (exeStamp, File.GetLastWriteTimeUtc (exePath), "exe no change"); Assert.AreEqual (exeStamp, File.GetLastWriteTimeUtc (exePath), "exe no change");
Assert.IsTrue (File.Exists (mdbPath), "mdb existence"); Assert.IsTrue (File.Exists (mdbPath), "mdb existence");
Assert.AreNotEqual (mdbStamp, File.GetLastWriteTimeUtc (mdbPath), "mdb changed"); Assert.AreNotEqual (mdbStamp, File.GetLastWriteTimeUtc (mdbPath), "mdb changed");