From 8389ed190c3ec2840a66c15a704a17764efcff76 Mon Sep 17 00:00:00 2001 From: Kevin Froman Date: Mon, 10 Aug 2020 01:09:19 -0500 Subject: [PATCH] Basic check for QubesOS in runtime tests and to avoid starting LAN server --- src/etc/onionrvalues.py | 4 ++-- src/runtests/lanservertest.py | 4 ++++ tests/runtime-result.txt | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/etc/onionrvalues.py b/src/etc/onionrvalues.py index afaaae2c..45544f50 100755 --- a/src/etc/onionrvalues.py +++ b/src/etc/onionrvalues.py @@ -67,8 +67,8 @@ MOTD_SIGN_KEY = "TRH763JURNY47QPBTTQ4LLPYCYQK6Q5YA33R6GANKZK5C5DKCIGQ" """Public key that signs update notifications.""" UPDATE_SIGN_KEY = "TRH763JURNY47QPBTTQ4LLPYCYQK6Q5YA33R6GANKZK5C5DKCIGQ" -platform = platform.system() -if platform == 'Windows': +pf = platform.system() +if pf == 'Windows': SCRIPT_NAME = 'run-windows.bat' else: if os.path.exists(filepaths.daemon_mark_file): diff --git a/src/runtests/lanservertest.py b/src/runtests/lanservertest.py index 27d3489e..42f71861 100644 --- a/src/runtests/lanservertest.py +++ b/src/runtests/lanservertest.py @@ -7,8 +7,12 @@ from gevent import sleep from coredb import blockmetadb from onionrutils.epoch import get_epoch import logger +from etc import onionrvalues def test_lan_server(testmanager): + if onionrvalues.IS_QUBES: + logger.warn("Cannot test LAN on QubesOS", terminal=True) + return start_time = get_epoch() for i in range(1337, 1340): try: diff --git a/tests/runtime-result.txt b/tests/runtime-result.txt index f33ec491..cd412f8c 100644 --- a/tests/runtime-result.txt +++ b/tests/runtime-result.txt @@ -1 +1 @@ -1593561863 \ No newline at end of file +1597039738 \ No newline at end of file