tests: Check for orphaned layout files

This adds a test which scans the layouts directory for files which have not been added to the resources file.
The majority os user-submitted layouts don't include layout registration, and I ran out of ideas for how to make it more visible in the documentation. Instead, it's going to be solved on the other side: the CI pipelines shall fail.

To make it easy on experimenters with untidy trees, it's disabled by default.
This commit is contained in:
Dorota Czaplejewicz
2022-09-15 13:09:24 +00:00
parent a4e58aef6a
commit d26927dc44
6 changed files with 74 additions and 2 deletions

View File

@ -127,3 +127,14 @@ foreach layout : [
endforeach
endif
if get_option('find_orphans')
test('test_find_orphans',
cargo_script,
args: ['run'] + cargo_build_flags
+ ['--example', 'find_orphan_layouts',
'--', meson.source_root() + '/data/keyboards/'],
timeout: timeout,
workdir: meson.build_root(),
)
endif