[mobile_static] Build mono/tests bitcode files in subdirectories to make threadsafe
authorAlexander Kyte <alexmkyte@fastmail.com>
Thu, 16 Jun 2016 23:06:46 +0000 (19:06 -0400)
committerAlexander Kyte <alexmkyte@gmail.com>
Mon, 18 Jul 2016 19:03:45 +0000 (15:03 -0400)
mono/tests/test-runner.cs

index 8b456247222e6be7165641cad4b58f1ddb5b4b42..a25092489e5cfce4f24aa3b62f93b4a1b8e0ff7a 100644 (file)
@@ -241,6 +241,8 @@ public class TestRunner
                                                string test_bitcode_arg = ",temp-path=" + test_bitcode_output;
                                                string aot_args = aot_build_flags + test_bitcode_arg + " " + test_name;
 
+                                               Directory.CreateDirectory(test_bitcode_output);
+
                                                ProcessStartInfo job = new ProcessStartInfo (runtime, aot_args);
                                                job.UseShellExecute = false;
                                                job.EnvironmentVariables[ENV_TIMEOUT] = timeout.ToString();
@@ -255,11 +257,11 @@ public class TestRunner
                                                                compiler.Kill ();
                                                        } catch {
                                                        }
-                                                       throw new Exception(String.Format("Timeout AOT compiling tests"));
+                                                       throw new Exception(String.Format("Timeout AOT compiling tests, output in {0}", test_bitcode_output));
                                                } else if (compiler.ExitCode != 0) {
-                                                       throw new Exception(String.Format("Error AOT compiling tests"));
+                                                       throw new Exception(String.Format("Error AOT compiling tests, output in {0}", test_bitcode_output));
                                                } else {
-                                                       File.Delete (test_bitcode_output);
+                                                       Directory.Delete (test_bitcode_output, true);
                                                }
                                        }
                                });