commit 7c42d62b3a39385470c5db0bf16262e58e1f0ff7 Author: juga0 juga@riseup.net Date: Wed Jan 9 15:49:26 2019 +0000
scanner: exit after the first loop in test networks
In order to run the scanner as part of the integration tests. --- sbws/core/scanner.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/sbws/core/scanner.py b/sbws/core/scanner.py index 7246f12..791d719 100644 --- a/sbws/core/scanner.py +++ b/sbws/core/scanner.py @@ -382,6 +382,11 @@ def run_speedtest(args, conf): loop_tstop = time.time() loop_tdelta = (loop_tstop - loop_tstart) / 60 log.info("Measured %s relays in %s minutes", num_relays, loop_tdelta) + # In a testing network, exit after first loop + if controller.get_conf('TestingTorNetwork') == '1': + log.info("In a testing network, exiting after the first loop.") + # Threads should be closed nicely in some refactor + exit(0)
def gen_parser(sub):
tor-commits@lists.torproject.org