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

[tor-commits] [ooni-probe/master] Fix missing argument in runTestCasesWithInput



commit 67c9043634fb55af2a76b331350cd156ba8fb437
Author: Arturo Filastò <art@xxxxxxxxx>
Date:   Wed Nov 28 15:54:26 2012 +0100

    Fix missing argument in runTestCasesWithInput
---
 ooni/runner.py |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ooni/runner.py b/ooni/runner.py
index 5fa80ae..a4b3472 100644
--- a/ooni/runner.py
+++ b/ooni/runner.py
@@ -239,7 +239,7 @@ def runTestCasesWithInput(test_cases, test_input, yaml_reporter,
     test_methods_d.addCallback(tests_done, test_cases[0][0])
     return test_methods_d
 
-def runTestCasesWithInputUnit(test_cases, input_unit, oreporter):
+def runTestCasesWithInputUnit(test_cases, input_unit, yaml_reporter, oonib_reporter):
     """
     Runs the Test Cases that are given as input parallely.
     A Test Case is a subclass of ooni.nettest.NetTestCase and a list of
@@ -252,14 +252,13 @@ def runTestCasesWithInputUnit(test_cases, input_unit, oreporter):
 
     input_unit: A generator that yields an input per iteration
 
-    oreporter: An instance of a subclass of ooni.reporter.OReporter
     """
     log.debug("Running test cases with input unit")
     dl = []
     for test_input in input_unit:
         log.debug("Running test with this input %s" % test_input)
         d = runTestCasesWithInput(test_cases,
-                test_input, oreporter)
+                test_input, yaml_reporter, oonib_reporter)
         dl.append(d)
     return defer.DeferredList(dl)
 
@@ -373,11 +372,14 @@ def updateProgressMeters(test_filename, input_unit_factory,
     config.state[test_filename].per_item_average = 2.0
 
     input_unit_idx = float(config.stateDict[test_filename])
-    input_unit_items = float(len(input_unit_factory))
+    input_unit_items = float(len(input_unit_factory) + 1)
     test_case_number = float(test_case_number)
     total_iterations = input_unit_items * test_case_number
     current_iteration = input_unit_idx * test_case_number
 
+    log.debug("input_unit_items: %s" % input_unit_items)
+    log.debug("test_case_number: %s" % test_case_number)
+
     log.debug("Test case number: %s" % test_case_number)
     log.debug("Total iterations: %s" % total_iterations)
     log.debug("Current iteration: %s" % current_iteration)

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