'handle a setup/call/teardown report, generating the appropriate
xml tags as necessary.
note: due to plugins like xdist, this hook may be called in interlaced
order with reports from other nodes. for example:
usual call order:
-> setup node1
-> call node1
-> teardown node1
-> setup node2
-> call node2
-> teardown node2
possible call order in xdist:
-> setup node1
-> call node1
-> setup node2
-> call node2
-> teardown node2
-> teardown node1'

def pytest_runtest_logreport(self, report):

    if report.passed:
        if (report.when == 'call'):
            reporter = self._opentestcase(report)
            reporter.append_pass(report)
    elif report.failed:
        reporter = self._opentestcase(report)
        if (report.when == 'call'):
            reporter.append_failure(report)
        else:
            reporter.append_error(report)
    elif report.skipped:
        reporter = self._opentestcase(report)
        reporter.append_skipped(report)
    self.update_testcase_duration(report)
    if (report.when == 'teardown'):
        self.finalize(report)
