
success = None
events = testRun.getEvents()

print 'Events:', events
print 'Stores:', testRun.usedStores

def successCounters(p):
    return p.get('result') is None and p.get('wrong') == 0 and p.get('exceptions') == 0

if events:
    success = True
    for ev in events:
            p = ev.getProperties()
            if p.get('result') not in [None, 'PASSED'] or not successCounters(p):
                success = False
                break

resultHolder.setResult(success)