Skip to content

Commit c43357e

Browse files
committed
Bump and rework tests
1 parent 368358b commit c43357e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:fastdevv2@0a43ffec4dda8d35878bad638d54211ebebec6f9
1+
xamarin/monodroid:fastdevv2@3c3f90b1de38c4f24148349b2516f42f277016c1
22
mono/mono:2020-02@075c3f06197e3b969f4234d0f56a2e10ee6ee305

tests/MSBuildDeviceIntegration/Tests/InstallTests.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void ReInstallIfUserUninstalled ([Values (false, true)] bool isRelease)
5656
Assert.IsTrue (builder.Output.AreTargetsAllBuilt ("_Upload"), "_Upload should have built completely.");
5757
Assert.AreEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
5858
$"{proj.PackageName} is not installed on the device.");
59+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
5960
}
6061
}
6162

@@ -68,7 +69,7 @@ public void InstallAndUnInstall ([Values (false, true)] bool isRelease)
6869
if (!HasDevices) {
6970
Assert.Ignore ("Test Skipped no devices or emulators found.");
7071
}
71-
72+
7273
var proj = new XamarinAndroidApplicationProject () {
7374
IsRelease = isRelease,
7475
};
@@ -136,6 +137,7 @@ public void ChangeKeystoreRedeploy ()
136137
proj.SetProperty ("AndroidSigningKeyAlias", "mykey");
137138

138139
Assert.IsTrue (builder.Install (proj), "second install should succeed.");
140+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
139141
}
140142
}
141143

@@ -179,7 +181,7 @@ public void SwitchConfigurationsShouldRedeploy ()
179181
Assert.IsTrue (builder.Install (proj));
180182
Assert.AreEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
181183
$"{proj.PackageName} is not installed on the device.");
182-
184+
183185
directorylist = string.Empty;
184186
foreach (var dir in overrideDirs) {
185187
var listing = RunAdbCommand ($"shell ls {dir}");
@@ -200,7 +202,7 @@ public void SwitchConfigurationsShouldRedeploy ()
200202
directorylist += listing;
201203
}
202204
StringAssert.Contains ($"{proj.AssemblyName}", directorylist, $"{proj.AssemblyName} not found in fastdev directory.");
203-
205+
204206
Assert.IsTrue (builder.Uninstall (proj));
205207
Assert.AreNotEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
206208
$"{proj.PackageName} is installed on the device.");
@@ -262,7 +264,7 @@ public void InstallWithoutSharedRuntime ()
262264
StringAssert.Contains ($"{proj.ProjectName}.dll", directorylist, $"{proj.ProjectName}.dll should exist in the .__override__ directory.");
263265
StringAssert.Contains ($"System.dll", directorylist, $"System.dll should exist in the .__override__ directory.");
264266
StringAssert.Contains ($"Mono.Android.dll", directorylist, $"Mono.Android.dll should exist in the .__override__ directory.");
265-
267+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
266268
}
267269
}
268270

@@ -345,6 +347,7 @@ public void ToggleFastDev ()
345347

346348
//Deploy one last time to verify install still works without the .__override__ directory existing
347349
Assert.IsTrue (builder.Install (proj), "Third install should have succeeded.");
350+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
348351
}
349352
}
350353

tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ public void InstantRunNativeLibrary ([Values ("dx", "d8")] string dexTool)
335335

336336
nativeLib.BinaryContent = () => new byte [20];
337337
nativeLib.Timestamp = DateTime.UtcNow.AddSeconds(1);
338+
nativeLibx86.BinaryContent = () => new byte [20];
339+
nativeLibx86.Timestamp = DateTime.UtcNow.AddSeconds(1);
338340
Assert.IsTrue (b.Install (proj, doNotCleanupOnUpdate: true, saveProject: false), "install should have succeeded. 1");
339341
logLines = b.LastBuildOutput;
340342
Assert.IsFalse (logLines.Any (l => l.Contains ("Building target \"_BuildApkFastDev\" completely.") ||

0 commit comments

Comments
 (0)