diff --git a/scripts/test.py b/scripts/test.py index aeea24c1..facf6b38 100644 --- a/scripts/test.py +++ b/scripts/test.py @@ -49,8 +49,12 @@ def start_server(): t6.start() def start_ua2f(u: str): - p = subprocess.Popen([u]) - atexit.register(lambda: p.kill()) + try: + out = subprocess.check_output([u]) + print(out) + except Exception as e: + print(e) + exit(-1) def setup_iptables(): @@ -92,6 +96,9 @@ def assert_equal(actual, expected): response = requests.get(f"http://127.0.0.1:{PORT}", headers={ "User-Agent": nxt }) + if not response.ok: + print(response.status_code) + print(response.text) assert response.ok assert response.text == str(len(nxt))