0001-Use-DATADIR-and-append-i386-to-fix-libkbdfile-test08.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 4c12f76f4177cfd560cf708a16774ebfadbd41a5 Mon Sep 17 00:00:00 2001
  2. From: "Mingde (Matthew) Zeng" <matthew.zeng@windriver.com>
  3. Date: Wed, 22 Jan 2020 11:02:17 -0500
  4. Subject: [PATCH] Use DATADIR and append i386 to fix libkbdfile-test08 ptest
  5. failure
  6. Replace ABS_DATADIR with DATADIR and append i386 to dirpath.
  7. Upstream-Status: Inappropriate [OE specific]
  8. This OE specific patch applies to kbd v2.2.0 for now, the upstream
  9. made drastic changes since v2.2.0, in fact they got rid of ABS_DATADIR
  10. in commit 5b6df5c along with a series of other commits which may or
  11. may not fix this issue. We will find out in future releases.
  12. Signed-off-by: Matthew Zeng<Matthew.Zeng@windriver.com>
  13. ---
  14. tests/libkbdfile-test08.c | 6 +++---
  15. 1 file changed, 3 insertions(+), 3 deletions(-)
  16. diff --git a/tests/libkbdfile-test08.c b/tests/libkbdfile-test08.c
  17. index bf41707..5e287f1 100644
  18. --- a/tests/libkbdfile-test08.c
  19. +++ b/tests/libkbdfile-test08.c
  20. @@ -14,14 +14,14 @@ main(int __attribute__((unused)) argc, char **argv)
  21. if (!fp)
  22. kbd_error(EXIT_FAILURE, 0, "unable to create kbdfile");
  23. - const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/**", 0 };
  24. + const char *const dirpath[] = { "", DATADIR "/findfile/test_0/keymaps/i386/**", 0 };
  25. const char *const suffixes[] = { "", ".map", ".kmap", 0 };
  26. - const char *expect = ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
  27. + const char *expect = DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0.map";
  28. int rc = 0;
  29. - rc = kbdfile_find((char *)(ABS_DATADIR "/findfile/test_0/keymaps/i386/qwerty/test0"), (char **) dirpath, (char **) suffixes, fp);
  30. + rc = kbdfile_find((char *)"test0", (char **) dirpath, (char **) suffixes, fp);
  31. if (rc != 0)
  32. kbd_error(EXIT_FAILURE, 0, "unable to find file");
  33. --
  34. 2.24.1