[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit b59d9343354990a39a87fd6e7fe655c632117feb
Author: Arturo Filastò <art@xxxxxxxxx>
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
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits