Imported Upstream version 4.3.2.467

Former-commit-id: 9c2cb47f45fa221e661ab616387c9cda183f283d
This commit is contained in:
Xamarin Public Jenkins
2016-02-22 11:00:01 -05:00
parent f302175246
commit f3e3aab35a
4097 changed files with 122406 additions and 82300 deletions

View File

@@ -49,6 +49,13 @@ namespace NUnit.Core
TestCaseResult testResult = MakeTestCaseResult();
listener.TestStarted( this.TestName );
// The babysitter's enter/leave "listeners" specifically exist to track crashes,
// so unfortunately they can't work through the (asynchronous) listener interface.
bool willRun = this.RunState == RunState.Runnable || this.RunState == RunState.Explicit;
if (willRun)
BabysitterSupport.RecordEnterTest(this.TestName.FullName);
long startTime = DateTime.Now.Ticks;
switch (this.RunState)
@@ -68,6 +75,10 @@ namespace NUnit.Core
}
long stopTime = DateTime.Now.Ticks;
if (willRun)
BabysitterSupport.RecordLeaveTest(this.TestName.FullName);
double time = ((double)(stopTime - startTime)) / (double)TimeSpan.TicksPerSecond;
testResult.Time = time;