From 2f8064a6e4b85b7a0ef6661c98110f9b5d938604 Mon Sep 17 00:00:00 2001 From: Rolf Bjarne Kvinge Date: Tue, 31 Jan 2017 09:09:22 +0100 Subject: [PATCH] [mtouch tests] Check if plist has changed before writing it. This is important for rebuild tests checking filestamps. --- tests/mtouch/MTouchTool.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/mtouch/MTouchTool.cs b/tests/mtouch/MTouchTool.cs index 834086ec91..8cadaa9407 100644 --- a/tests/mtouch/MTouchTool.cs +++ b/tests/mtouch/MTouchTool.cs @@ -495,7 +495,7 @@ public partial class NotificationService : UNNotificationServiceExtension AppPath = app; RootAssembly = MTouch.CompileTestAppLibrary (testDir, code: code, profile: Profile, extraArg: extraArg, appName: appName); - File.WriteAllText (Path.Combine (app, "Info.plist"), + var info_plist = @" @@ -527,7 +527,10 @@ public partial class NotificationService : UNNotificationServiceExtension -"); +"; + var plist_path = Path.Combine (app, "Info.plist"); + if (!File.Exists (plist_path) || File.ReadAllText (plist_path) != info_plist) + File.WriteAllText (plist_path, info_plist); } public void CreateTemporaryWatchKitExtension (string code = null)