Skip to content
Snippets Groups Projects
Commit 3e9b9bd2 authored by Simon McVittie's avatar Simon McVittie
Browse files

tests: Move launcher.py out of tests/pressure-vessel/


It doesn't actually have anything to do with pressure-vessel any more.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 39ba820d
No related branches found
No related tags found
1 merge request!620Move non-PV-specific tests outside tests/pressure-vessel/
......@@ -495,6 +495,13 @@ test_scripts = [
{'name': 'test-utils.py'},
]
if get_option('bin')
test_scripts += [
{'name': 'test-launcher.py', 'dbus': true, 'timeout': 90},
{'name': 'test-launcher.py', 'dbus': true, 'full_python': true, 'timeout': 90},
]
endif
if get_option('libcurl_compat')
test_scripts += [
{'name': 'libcurl-compat.py'},
......@@ -504,28 +511,58 @@ endif
foreach test_info : test_scripts
test_name = test_info['name']
program = files(test_name)
program_path = program
wrapper = ''
relocatable_wrapper = ''
test_argv = []
timeout = 30
timeout = test_info.get('timeout', 30)
build_time = test_info.get('build_time', true)
installable = test_info.get('installable', true)
needs_dbus = test_info.get('dbus', false)
if test_name.endswith('.py')
if test_info.get('full_python', false)
test_name = 'full-python-' + test_name
test_argv += ['-S', program]
program = full_python
program_path = program.full_path()
installable = false
elif test_name.endswith('.py')
test_argv += ['-S', program]
program = python
program_path = program.full_path()
wrapper = get_option('prefix') / tests_dir / 'find-python.sh'
relocatable_wrapper = '${G_TEST_BUILDDIR}/find-python.sh'
endif
test(
test_name, program,
args : test_argv,
depends : test_depends,
env : test_env,
protocol : 'tap',
timeout : timeout,
)
if needs_dbus
installable = false
if dbus_run_session.found()
test_argv = [
'--config-file',
no_activation_session_conf,
'--',
program_path,
] + test_argv
program = dbus_run_session
program_path = program.full_path()
else
build_time = false
endif
endif
if get_option('installed_tests')
if build_time
test(
test_name, program,
args : test_argv,
depends : test_depends,
env : test_env,
protocol : 'tap',
timeout : timeout,
)
endif
if get_option('installed_tests') and installable
install_data(
test_name,
install_dir : tests_dir,
......
......@@ -61,7 +61,6 @@ tests = [
'cheap-copy.py',
'containers.py',
'invocation.py',
'launcher.py',
'mtree-apply.py',
'test-locale-gen.sh',
]
......@@ -133,7 +132,7 @@ foreach test_name : tests
test_argv += [files(test_name)]
if test_name in ['test-locale-gen.sh', 'launcher.py']
if test_name in ['test-locale-gen.sh']
timeout = 90
endif
......@@ -154,24 +153,6 @@ foreach test_name : tests
suite : ['pressure-vessel'],
timeout : timeout,
)
# Re-run launcher.py with the default python3 version (if any)
# to try the code path involving gi.repository.Gio
if test_name == 'launcher.py' and full_python.found()
test(
'full-python-' + test_name,
dbus_run_session,
args : [
'--',
full_python.full_path(),
files(test_name),
],
depends : test_depends,
env : test_env,
protocol : 'tap',
suite : ['pressure-vessel'],
timeout : timeout,
)
endif
endif
endforeach
......
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment