# NOTE: Please do not edit this file directly
# Create your custom qualifications in the 'ext' folder

result = {'success': True}
events = testRuns.getResultEventsThatChangedFromLastRun(testRun)

if events:
    regression = filter(lambda ev: ev.get('result') not in [None, 'PASSED'], events)
    if regression:
        result['success'] = False
        result['reason'] = 'Regression occurred in: %s' % ", ".join(map(lambda ev: ev.get('name'), regression))

resultHolder.setResult(result)