Skip to content
Snippets Groups Projects
Commit 65e7e29d authored by juga's avatar juga
Browse files

Merge branch 'bug28933_01'

Solved conflicts:
	sbws/core/scanner.py
	tox.ini
parents 09ea0377 adcaf04d
No related branches found
No related tags found
No related merge requests found
......@@ -476,7 +476,11 @@ def main_loop(args, conf, controller, relay_list, circuit_builder, result_dump,
loop_tstop = time.time()
loop_tdelta = (loop_tstop - loop_tstart) / 60
log.debug("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 run_speedtest(args, conf):
"""Initializes all the data and threads needed to measure the relays.
......
[general]
# Days into the past that measurements are considered valid
data_period = 1
[paths]
sbws_home = /tmp/.sbws
[destinations]
local = on
[destinations.local]
; url = https://localhost:28888/sbws.bin
url = http://127.0.0.1:28888/sbws.bin
verify = False
[tor]
extra_lines =
DirAuthority auth1 orport=2002 no-v2 v3ident=D7DBC517EFD2BA1A5012CF1BD0BB38F17C8160BD 127.10.0.1:2003 AA45C13025C037F056E734169891878ED0880231
DirAuthority auth2 orport=2002 no-v2 v3ident=4EE103A081F400E6622F5461D51782B876BB5C24 127.10.0.2:2003 E7B3C9A0040D628DAC88B0251AE6334D28E8F531
DirAuthority auth3 orport=2002 no-v2 v3ident=8B85069C7FC0593801E6491A34100264FCE28980 127.10.0.3:2003 35E3B8BB71C81355649AEC5862ECB7ED7EFDBC5C
TestingTorNetwork 1
NumCPUs 1
[logging]
level = debug
to_stdout_level = ${level}
\ No newline at end of file
......@@ -43,16 +43,22 @@ whitelist_externals =
bash
sleep
wget
mkdir
commands =
cp -af {toxinidir}/tests/integration/net {envtmpdir}
bash {envtmpdir}/net/start.sh
bash -c "time python3 {envtmpdir}/net/wait.py {envtmpdir}/net/{auth,relay,exit}*"
bash -c "python3 {toxinidir}/scripts/tools/sbws-http-server.py --port 28888 &>/dev/null &"
sleep 15
sleep 1
wget -O/dev/null http://127.0.0.1:28888/sbws.bin
; Run actually the scanner
mkdir -p /tmp/.sbws
; This add around 3min more to the tests
sbws -c {toxinidir}/tests/integration/sbws_testnet.ini scanner
coverage run -a --rcfile={toxinidir}/.coveragerc --source=sbws -m pytest -s {toxinidir}/tests/integration -vv
bash {envtmpdir}/net/stop.sh
# no need to remove .tox/net directory.
rm -rf /tmp/.sbws
[testenv:lint]
skip_install = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment