[tor-commits] [ooni-probe/master] Fix the setting of the test runtime for tests with post processor

art at torproject.org art at torproject.org
Fri Oct 17 15:53:27 UTC 2014


commit b59d9343354990a39a87fd6e7fe655c632117feb
Author: Arturo Filastò <art at fuffa.org>
Date:   Fri Oct 17 17:21:00 2014 +0200

    Fix the setting of the test runtime for tests with post processor
---
 ooni/nettest.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ooni/nettest.py b/ooni/nettest.py
index 4a07b7d..1a780fd 100644
--- a/ooni/nettest.py
+++ b/ooni/nettest.py
@@ -528,9 +528,11 @@ class NetTest(object):
                 if self.report:
                     post = defer.DeferredList(measurements)
 
-                    @post.addCallback
+                    @post.addBoth
                     def set_runtime(results):
                         runtime = time.time() - test_instance._start_time
+                        for _, m in results:
+                            m.testInstance.report['test_runtime'] = runtime
                         test_instance.report['test_runtime'] = runtime
                         return results
 





More information about the tor-commits mailing list