commit 0226bdb130827511f1ec7347a2c1e9d1281ff53a Author: aagbsn aagbsn@extc.org Date: Wed Sep 18 13:44:31 2013 +0200
Make the director pass Measurements to the report
Simply passing a failure instance does not provide any contextual information, such as the input that was used, or headers. Instead, we should always write the report object, even in case of failure, and NetTests should try to add useful information to the report in their errbacks. --- ooni/director.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ooni/director.py b/ooni/director.py index 50323fd..628b812 100644 --- a/ooni/director.py +++ b/ooni/director.py @@ -178,7 +178,7 @@ class Director(object): log.msg("Successfully completed measurement: %s" % measurement) self.totalMeasurementRuntime += measurement.runtime self.successfulMeasurements += 1 - return measurement.testInstance.report + return measurement
def measurementFailed(self, failure, measurement): log.msg("Failed doing measurement: %s" % measurement) @@ -186,7 +186,7 @@ class Director(object):
self.failedMeasurements += 1 self.failures.append((failure, measurement)) - return failure + return measurement
def reporterFailed(self, failure, net_test): """