public int StandardCPythonTests(TestInfo testcase) { try { return(executor.RunTest(testcase)); } catch (Exception e) { Assert.Fail(executor.FormatException(e)); return(-1); } }
public int CTypesCPythonTests(TestInfo testcase) { try { TestContext.Progress.WriteLine(testcase.Name); // should be printed immediately return(executor.RunTest(testcase)); } catch (Exception e) { Assert.Fail(executor.FormatException(e)); return(-1); } }
protected int TestImpl(TestInfo testcase) { try { TestContext.Progress.WriteLine(testcase.Name); return(executor.RunTest(testcase)); } catch (Exception e) { if (e is AggregateException ae) { ae.Handle((x) => { Assert.Fail(executor.FormatException(x)); return(true); }); } else { Assert.Fail(this.executor.FormatException(e)); } return(-1); } }
protected int TestImpl(TestInfo testcase) { using var m = new Mutex(false, testcase.Name); m.WaitOne(); try { TestContext.Progress.WriteLine(testcase.Name); return(executor.RunTest(testcase)); } catch (Exception e) { if (e is AggregateException ae) { ae.Handle((x) => { Assert.Fail(executor.FormatException(x)); return(true); }); } else { Assert.Fail(this.executor.FormatException(e)); } return(-1); } finally { m.ReleaseMutex(); } }