mirror of
https://github.com/swaywm/sway.git
synced 2026-04-30 06:46:24 -04:00
Add test to run sway
Sets the PATH variable correctly so that it finds the auxilliary executables. To use: run "meson test -v sway" in the build directory. Added an "interactive-tests" option for when actual tests are added.
This commit is contained in:
parent
1f1b1b34d6
commit
f146ee2820
3 changed files with 12 additions and 1 deletions
10
meson.build
10
meson.build
|
|
@ -217,3 +217,13 @@ if (get_option('fish_completions'))
|
||||||
|
|
||||||
install_data(fish_files, install_dir: fish_install_dir)
|
install_data(fish_files, install_dir: fish_install_dir)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if (get_option('interactive-tests'))
|
||||||
|
# A test to run the just built sway executable, with all the auxilliaries
|
||||||
|
# in the path.
|
||||||
|
sway_paths_find_cmd = 'find @0@ -maxdepth 1 -type d -name \'sway*\' -printf \':%p\''.format(meson.current_build_dir())
|
||||||
|
sway_paths = run_command('sh', '-c', sway_paths_find_cmd).stdout().strip()
|
||||||
|
current_env = environment()
|
||||||
|
current_env.append('PATH', sway_paths)
|
||||||
|
test('sway', sway_exec, env : current_env, is_parallel : false, timeout : 3600)
|
||||||
|
endif
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,4 @@ option('zsh_completions', type: 'boolean', value: true, description: 'Install zs
|
||||||
option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
|
option('bash_completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
|
||||||
option('fish_completions', type: 'boolean', value: true, description: 'Install fish shell completions.')
|
option('fish_completions', type: 'boolean', value: true, description: 'Install fish shell completions.')
|
||||||
option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications')
|
option('enable-xwayland', type: 'boolean', value: true, description: 'Enable support for X11 applications')
|
||||||
|
option('interactive-tests', type: 'boolean', value: true, description: 'Enable interactive tests')
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ if get_option('enable-xwayland')
|
||||||
sway_deps += xcb
|
sway_deps += xcb
|
||||||
endif
|
endif
|
||||||
|
|
||||||
executable(
|
sway_exec = executable(
|
||||||
'sway',
|
'sway',
|
||||||
sway_sources,
|
sway_sources,
|
||||||
include_directories: [sway_inc],
|
include_directories: [sway_inc],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue