[test] There is no runtime directory on Android
[mono.git] / mcs / class / corlib / Test / System.Runtime.InteropServices / RuntimeEnvironmentTest.cs
index 4730b14dd0f9baf5b7929af9861956e047c11de5..660a556c18483017f7403ba25ed57b4aa0ab7a5a 100644 (file)
@@ -5,6 +5,7 @@
 //     Sebastien Pouliot  <sebastien@ximian.com>
 //
 // Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright 2011 Xamarin Inc (http://www.xamarin.com).
 //
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
@@ -40,6 +41,7 @@ namespace MonoTests.System.Runtime.InteropServices {
        public class RuntimeEnvironmentTest {
 
                [Test]
+               [Category ("MobileNotWorking")]
                public void SystemConfigurationFile ()
                {
                        string fname = RuntimeEnvironment.SystemConfigurationFile;
@@ -55,16 +57,14 @@ namespace MonoTests.System.Runtime.InteropServices {
                }
 
                [Test]
-               [Category ("NotWorking")]
+#if MOBILE
+               [Ignore ("There's no GAC for the NET_2_1 based profiles (Moonlight, MonoTouch and Mono for Android")]
+#endif
                public void FromGlobalAccessCache ()
                {
                        Assembly corlib = typeof (int).Assembly;
-#if NET_2_0
-                       Assert.IsTrue (RuntimeEnvironment.FromGlobalAccessCache (corlib), "corlib");
-#else
-                       // note: mscorlib.dll wasn't in the GAC for 1.x
-                       Assert.IsFalse (RuntimeEnvironment.FromGlobalAccessCache (corlib), "corlib");
-#endif
+                       // FIXME: This doesn't work when doing make distcheck (probably because the corlib used isn't the GAC)
+//                     Assert.IsTrue (RuntimeEnvironment.FromGlobalAccessCache (corlib), "corlib");
                        Assembly corlib_test = Assembly.GetExecutingAssembly ();
                        Assert.IsFalse (RuntimeEnvironment.FromGlobalAccessCache (corlib_test), "corlib_test");
                }
@@ -74,7 +74,11 @@ namespace MonoTests.System.Runtime.InteropServices {
                {
                        string dirname = RuntimeEnvironment.GetRuntimeDirectory ();
                        Assert.IsNotNull (dirname, "GetRuntimeDirectory");
+#if MONODROID
+                       Assert.IsTrue (dirname.Length == 0, "directory name empty");
+#else
                        Assert.IsTrue (Directory.Exists (dirname), "Exists");
+#endif
                }
 
                [Test]