build_release: Add smoke test for OS X

This should prevent something like #1686 in the future.
This commit is contained in:
Florian Bruhin 2016-07-26 16:10:25 +02:00
parent 614794a62a
commit fb20352e3f

View File

@ -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."""