[tests] Use correct path in process tests
authorMarek Habersack <grendel@twistedcode.net>
Fri, 12 Jun 2015 13:55:24 +0000 (15:55 +0200)
committerMarek Habersack <grendel@twistedcode.net>
Wed, 15 Jul 2015 18:45:20 +0000 (20:45 +0200)
/bin/ls doesn't exist on Android, it's /system/bin/ls

mcs/class/System/Test/System.Diagnostics/ProcessTest.cs

index b8fde520c9270b1ccff1d0adcaed5a39865f92e3..0a316e34494d96dc0e468a39d7dfee56188f83c8 100644 (file)
@@ -838,9 +838,18 @@ namespace MonoTests.System.Diagnostics
                }
 
                
-               private ProcessStartInfo GetCrossPlatformStartInfo ()
-               {
-                       return RunningOnUnix ? new ProcessStartInfo ("/bin/ls", "/") : new ProcessStartInfo ("help", "");
+               ProcessStartInfo GetCrossPlatformStartInfo ()
+               {
+                       if (RunningOnUnix) {
+                               string path;
+#if MONODROID
+                               path = "/system/bin/ls";
+#else
+                               path = "/bin/ls";
+#endif
+                               return new ProcessStartInfo (path, "/");
+                       } else
+                               return new ProcessStartInfo ("help", "");
                }
 
                [Test]