Run frozen smoke test via pytest.
This commit is contained in:
parent
ae07e00038
commit
7d6c39d64b
@ -14,5 +14,4 @@ test_script:
|
||||
- C:\Python34\Scripts\tox -e py34
|
||||
- C:\Python34\Scripts\tox -e py34-integration
|
||||
- C:\Python34\Scripts\tox -e unittests-frozen
|
||||
- C:\Python34\Scripts\tox -e smoke-frozen
|
||||
- C:\Python34\Scripts\tox -e pylint
|
||||
|
@ -101,26 +101,27 @@ bdist_mac_options = {
|
||||
'bundle_name': 'qutebrowser',
|
||||
}
|
||||
|
||||
if sys.platform.startswith('win'):
|
||||
base = 'Win32GUI'
|
||||
target_name = 'qutebrowser.exe'
|
||||
else:
|
||||
base = None
|
||||
target_name = 'qutebrowser'
|
||||
|
||||
executable = cx.Executable('qutebrowser/__main__.py', base=base,
|
||||
targetName=target_name,
|
||||
shortcutName='qutebrowser',
|
||||
shortcutDir='ProgramMenuFolder',
|
||||
icon=os.path.join(BASEDIR, 'icons',
|
||||
'qutebrowser.ico'))
|
||||
def get_exe(base, target_name):
|
||||
return cx.Executable('qutebrowser/__main__.py', base=base,
|
||||
targetName=target_name, shortcutName='qutebrowser',
|
||||
shortcutDir='ProgramMenuFolder',
|
||||
icon=os.path.join(BASEDIR, 'icons',
|
||||
'qutebrowser.ico'))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if sys.platform.startswith('win'):
|
||||
base = 'Win32GUI'
|
||||
target_name = 'qutebrowser.exe'
|
||||
else:
|
||||
base = None
|
||||
target_name = 'qutebrowser'
|
||||
|
||||
try:
|
||||
setupcommon.write_git_file()
|
||||
cx.setup(
|
||||
executables=[executable],
|
||||
executables=[get_exe(base, target_name)],
|
||||
options={
|
||||
'build_exe': get_build_exe_options(),
|
||||
'bdist_msi': bdist_msi_options,
|
||||
|
@ -69,12 +69,14 @@ def get_build_exe_options():
|
||||
|
||||
def main():
|
||||
"""Main entry point."""
|
||||
base = 'Win32GUI' if sys.platform.startswith('win') else None
|
||||
with temp_git_commit_file():
|
||||
cx.setup(
|
||||
executables=[cx.Executable('scripts/dev/run_frozen_tests.py',
|
||||
targetName='run-frozen-tests'),
|
||||
cx.Executable('tests/integration/webserver_sub.py',
|
||||
targetName='webserver_sub')],
|
||||
targetName='webserver_sub'),
|
||||
freeze.get_exe(base, target_name='qutebrowser')],
|
||||
options={'build_exe': get_build_exe_options()},
|
||||
**setupcommon.setupdata
|
||||
)
|
||||
|
@ -21,13 +21,17 @@
|
||||
|
||||
|
||||
import sys
|
||||
import os.path
|
||||
import subprocess
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.mark.not_frozen
|
||||
def test_smoke():
|
||||
argv = [sys.executable, '-m', 'qutebrowser', '--debug', '--no-err-windows',
|
||||
'--nowindow', '--temp-basedir', 'about:blank', ':later 500 quit']
|
||||
if hasattr(sys, 'frozen'):
|
||||
argv = [os.path.join(os.path.dirname(sys.executable), 'qutebrowser')]
|
||||
else:
|
||||
argv = [sys.executable, '-m', 'qutebrowser']
|
||||
argv += ['--debug', '--no-err-windows', '--nowindow', '--temp-basedir',
|
||||
'about:blank', ':later 500 quit']
|
||||
subprocess.check_call(argv)
|
||||
|
12
tox.ini
12
tox.ini
@ -176,18 +176,6 @@ commands =
|
||||
git --no-pager diff --exit-code --stat
|
||||
{envpython} scripts/asciidoc2html.py {posargs}
|
||||
|
||||
[testenv:smoke-frozen]
|
||||
basepython = python3
|
||||
passenv = {[testenv]passenv}
|
||||
skip_install = true
|
||||
deps =
|
||||
{[testenv]deps}
|
||||
cx_Freeze==4.3.4
|
||||
commands =
|
||||
{envpython} scripts/link_pyqt.py --tox {envdir}
|
||||
{envpython} scripts/dev/freeze.py build_exe --qute-skip-html -b {envdir}/build
|
||||
{envdir}/build/qutebrowser --no-err-windows --nowindow --temp-basedir about:blank ":later 500 quit"
|
||||
|
||||
[testenv:cxfreeze-windows]
|
||||
# PYTHON is actually required when using this env, but the entire tox.ini would
|
||||
# fail if we didn't have a fallback defined.
|
||||
|
Loading…
Reference in New Issue
Block a user