[tests] Disable test on llvm
[mono.git] / mono / tests / bug-17537.cs
1 using System;
2 using System.IO;
3 using System.Diagnostics;
4
5 public class Test {
6         public static int Main(string[] args)
7         {
8                 // Only run this test on Unix
9                 int pl = (int) Environment.OSVersion.Platform;
10                 if ((pl != 4) && (pl != 6) && (pl != 128)) {
11                         return 0;
12                 }
13
14                 // Try to invoke the helper assembly
15                 // Return 0 only if it is successful
16                 try
17                 {
18                         var name = "bug-17537-helper.exe";
19                         Console.WriteLine ("Launching subprocess: {0}", name);
20                         var p = new Process();
21                         p.StartInfo.FileName = Path.Combine (AppDomain.CurrentDomain.BaseDirectory + name);
22                         p.StartInfo.UseShellExecute = false;
23
24                         var result = p.Start();
25                         p.WaitForExit(1000);
26                         if (result) {
27                                 Console.WriteLine ("Subprocess started successfully");
28                                 return 0;
29                         } else {
30                                 Console.WriteLine ("Subprocess failure");
31                                 return 1;
32                         }
33                 }
34                 catch (Exception e)
35                 {
36                         Console.WriteLine ("Subprocess exception");
37                         Console.WriteLine (e.Message);
38                         return 1;
39                 }
40         }
41 }