Add a smoke test to build_release.py.

This commit is contained in:
Florian Bruhin 2015-06-23 23:50:14 +02:00
parent 10b00da1ae
commit b21b4377a8

View File

@ -78,6 +78,12 @@ def _maybe_remove(path):
pass
def smoke_test(executable):
"""Try starting the given qutebrowser executable."""
subprocess.check_call([executable, '--no-err-windows', '--nowindow',
'--temp-basedir', 'about:blank', ':later 500 quit'])
def build_windows():
"""Build windows executables/setups."""
parts = str(sys.version_info.major), str(sys.version_info.minor)
@ -95,6 +101,11 @@ def build_windows():
utils.print_title("Running 64bit freeze.py bdist_msi")
call_freeze('bdist_msi', python=python_x64)
utils.print_title("Running 32bit smoke test")
smoke_test('build/exe.win32-{}/qutebrowser.exe'.format(dotver))
utils.print_title("Running 64bit smoke test")
smoke_test('build/exe.win-amd64-{}/qutebrowser.exe'.format(dotver))
destdir = os.path.join('dist', 'zip')
_maybe_remove(destdir)
os.makedirs(destdir)