[tests] Don't use Assembly.Location on Android
authorMarek Habersack <grendel@twistedcode.net>
Thu, 25 Jun 2015 18:32:10 +0000 (20:32 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Wed, 15 Jul 2015 18:45:29 +0000 (20:45 +0200)
Assembly.Location will contain just the assembly file name without any path, which
is not what the test(s) expect. The reason is that the assemblies on Android live
in the APK, are embedded in the native code or don't exist at all (AOT)

mcs/class/corlib/Test/System.Security.Policy/ZoneTest.cs

index 09fa93974700fdeae6307bc123b4f41444522ee4..00aa374348db05be7dae57d541cf5275cc326c31 100644 (file)
@@ -184,7 +184,10 @@ namespace MonoTests.System.Security.Policy {
                // files are always rooted (Path.IsPathRooted) and exists (File.Exists)
                string[] myComputerUrls = {
                        Path.GetTempFileName (),
+#if !MONODROID
+                       // Assembly.Location doesn't work on Android
                        Assembly.GetExecutingAssembly ().Location,
+#endif
                };
 
                [Test]