summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2022-06-15 17:39:33 +0200
committerFlorian Bruhin <me@the-compiler.org>2022-06-16 15:15:55 +0200
commit23cc4d186c422dbfed5ec346d9e3cdc894838b2c (patch)
treeaf889c3f341166a6c51023c97098d894621463fc
parent9cc91a0499ac3e21b5fcc24764360c7bfafeb07f (diff)
downloadqutebrowser-23cc4d186c422dbfed5ec346d9e3cdc894838b2c.tar.gz
qutebrowser-23cc4d186c422dbfed5ec346d9e3cdc894838b2c.zip
build-release: Add pre-dmg smoke test for macOS
Fixes #7254
-rwxr-xr-xscripts/dev/build_release.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py
index a4fbadf15..14dedd103 100755
--- a/scripts/dev/build_release.py
+++ b/scripts/dev/build_release.py
@@ -291,6 +291,11 @@ INFO_PLIST_UPDATES = {
}
+def _mac_bin_path(base):
+ """Get the macOS qutebrowser binary path."""
+ return os.path.join(base, 'qutebrowser.app', 'Contents', 'MacOS', 'qutebrowser')
+
+
def build_mac(*, gh_token, debug):
"""Build macOS .dmg/.app."""
utils.print_title("Cleaning up...")
@@ -301,14 +306,20 @@ def build_mac(*, gh_token, debug):
pass
for d in ['dist', 'build']:
shutil.rmtree(d, ignore_errors=True)
+
utils.print_title("Updating 3rdparty content")
# FIXME:qt6 Use modern PDF.js version here
update_3rdparty.run(ace=False, pdfjs=True, legacy_pdfjs=True, fancy_dmg=False,
gh_token=gh_token)
+
utils.print_title("Building .app via pyinstaller")
call_tox('pyinstaller-64', '-r', debug=debug)
utils.print_title("Patching .app")
patch_mac_app()
+
+ utils.print_title("Running pre-dmg smoke test")
+ smoke_test(_mac_bin_path('dist'), debug=debug)
+
utils.print_title("Building .dmg")
subprocess.run(['make', '-f', 'scripts/dev/Makefile-dmg'], check=True)
@@ -323,9 +334,7 @@ def build_mac(*, gh_token, debug):
subprocess.run(['hdiutil', 'attach', dmg_path,
'-mountpoint', tmpdir], check=True)
try:
- binary = os.path.join(tmpdir, 'qutebrowser.app', 'Contents',
- 'MacOS', 'qutebrowser')
- smoke_test(binary, debug=debug)
+ smoke_test(_mac_bin_path(tmpdir), debug=debug)
finally:
print("Waiting 10s for dmg to be detachable...")
time.sleep(10)