mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-27 07:58:47 -04:00
build: add a gen-scanner-test target
This adds a command to re-generate the test data. This needs to be done when either an XML source file or the scanner's output is changed. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
6626d4d98c
commit
0e139cfbc7
3 changed files with 38 additions and 6 deletions
|
|
@ -75,15 +75,23 @@ endif
|
|||
sed_path = find_program('sed').full_path()
|
||||
|
||||
if get_option('scanner')
|
||||
scanner_test_env = [
|
||||
'TEST_DATA_DIR=@0@/data'.format(meson.current_source_dir()),
|
||||
'TEST_OUTPUT_DIR=@0@/output'.format(meson.current_build_dir()),
|
||||
'SED=@0@'.format(sed_path),
|
||||
'WAYLAND_SCANNER=@0@'.format(wayland_scanner.full_path()),
|
||||
]
|
||||
|
||||
test(
|
||||
'scanner-test',
|
||||
find_program('scanner-test.sh'),
|
||||
env: [
|
||||
'TEST_DATA_DIR=@0@/data'.format(meson.current_source_dir()),
|
||||
'TEST_OUTPUT_DIR=@0@/output'.format(meson.current_build_dir()),
|
||||
'SED=@0@'.format(sed_path),
|
||||
'WAYLAND_SCANNER=@0@'.format(wayland_scanner.full_path()),
|
||||
],
|
||||
env: scanner_test_env,
|
||||
)
|
||||
|
||||
run_target(
|
||||
'gen-scanner-test',
|
||||
command: find_program('scanner-test-gen.sh'),
|
||||
env: scanner_test_env,
|
||||
)
|
||||
endif
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue