test: only use the quirks srcdir if we have a builddir

Same approach as we already do for other constants though note the
builddir_lookup() hack only works for release builds.

Closes #1230
This commit is contained in:
Peter Hutterer 2025-12-17 11:01:12 +10:00
parent 2d3e47290c
commit 7c4e7a40d3

View file

@ -2003,7 +2003,10 @@ litest_setup_quirks(struct list *created_files_list, enum quirks_setup_mode mode
switch (mode) {
case QUIRKS_SETUP_USE_SRCDIR:
dirname = LIBINPUT_QUIRKS_SRCDIR;
if (builddir_lookup(NULL))
dirname = LIBINPUT_QUIRKS_SRCDIR;
else
dirname = LIBINPUT_QUIRKS_DIR;
break;
case QUIRKS_SETUP_ONLY_DEVICE:
dirname = LIBINPUT_QUIRKS_DIR;