# self is an instance of Report, 'repository' is the JCR repo and 'testRun' contains info about the run.
# pass the result into 'resultHolder' like this: resultHolder.setResult({ 'success': success })

testSetChildren = testRun.testSetDefinition.sets

success = True
for child in testSetChildren:
  child.qualification.setRepository(repository)
  success = success and child.qualification.compute(testRun)

print "overall success: ", success
resultHolder.setResult(success)