From fb20352e3fcfb88dbea8ae3a6121497fb73758d8 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 26 Jul 2016 16:10:25 +0200 Subject: [PATCH] build_release: Add smoke test for OS X This should prevent something like #1686 in the future. --- scripts/dev/build_release.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 31906b0c2..d4057fae2 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -28,6 +28,7 @@ import shutil import subprocess import argparse import tarfile +import tempfile import collections sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir, @@ -103,6 +104,17 @@ def build_osx(): for d in ['dist', 'build']: shutil.rmtree(d) + utils.print_title("Running smoke test") + with tempfile.TemporaryDirectory() as tmpdir: + subprocess.check_call(['hdiutil', 'attach', 'qutebrowser.dmg', + '-mountpoint', tmpdir]) + try: + binary = os.path.join(tmpdir, 'qutebrowser.app', 'Contents', + 'MacOS', 'qutebrowser') + subprocess.check_call([binary]) + finally: + subprocess.check_call(['hdiutil', 'detach', tmpdir]) + def build_windows(): """Build windows executables/setups."""