diff options
author | Micah Lee <micah@micahflee.com> | 2020-11-09 19:47:57 -0800 |
---|---|---|
committer | Micah Lee <micah@micahflee.com> | 2020-11-09 19:47:57 -0800 |
commit | f67e7ce67885dea4a8ed308fbffd84108a08ec22 (patch) | |
tree | 60362cc5c678b07283732ade5674866209832535 | |
parent | a8ef55550fca1d75706dc9447cec9953d9cb648e (diff) | |
download | onionshare-f67e7ce67885dea4a8ed308fbffd84108a08ec22.tar.gz onionshare-f67e7ce67885dea4a8ed308fbffd84108a08ec22.zip |
End web thread successfully when cleaning up after a tab, which prevents crashes after running the tests; and fix msi_filename in Windows build script
-rw-r--r-- | desktop/package/windows/build.py | 4 | ||||
-rw-r--r-- | desktop/src/onionshare/tab/tab.py | 2 | ||||
-rwxr-xr-x | desktop/tests/run.sh | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/desktop/package/windows/build.py b/desktop/package/windows/build.py index 9dd467f2..de2f921c 100644 --- a/desktop/package/windows/build.py +++ b/desktop/package/windows/build.py @@ -39,7 +39,9 @@ def main(): print("○ Create the binary") run(["briefcase", "create"], desktop_dir) run(["briefcase", "package"], desktop_dir) - msi_filename = glob.glob(os.path.join(cli_dir, "windows", "OnionShare-*.msi"))[0] + msi_filename = glob.glob(os.path.join(desktop_dir, "windows", "OnionShare-*.msi"))[ + 0 + ] print(f"○ Created unsigned installer: {msi_filename}") print(f"○ Signing installer") diff --git a/desktop/src/onionshare/tab/tab.py b/desktop/src/onionshare/tab/tab.py index 6a7624b9..b5e4e6a8 100644 --- a/desktop/src/onionshare/tab/tab.py +++ b/desktop/src/onionshare/tab/tab.py @@ -663,4 +663,6 @@ class Tab(QtWidgets.QWidget): return False def cleanup(self): + self.get_mode().web_thread.quit() + self.get_mode().web_thread.wait() self.app.cleanup() diff --git a/desktop/tests/run.sh b/desktop/tests/run.sh index 4a01dfb8..833c1516 100755 --- a/desktop/tests/run.sh +++ b/desktop/tests/run.sh @@ -1,5 +1,5 @@ #!/bin/bash -pytest -v tests/test_gui_tabs.py -pytest -v tests/test_gui_share.py -pytest -v tests/test_gui_receive.py +pytest -v tests/test_gui_tabs.py && \ +pytest -v tests/test_gui_share.py && \ +pytest -v tests/test_gui_receive.py && \ pytest -v tests/test_gui_website.py |