install-tests.patch 1022 B

12345678910111213141516171819202122232425262728293031323334
  1. From 8c1054eacb430472068f21e4840749c384e8e866 Mon Sep 17 00:00:00 2001
  2. From: Ross Burton <ross.burton@arm.com>
  3. Date: Mon, 5 Dec 2022 17:02:32 +0000
  4. Subject: [PATCH] add yocto-specific install-ptest target
  5. Add a target to install the test suite.
  6. Upstream-Status: Inappropriate
  7. Signed-off-by: Ross Burton <ross.burton@arm.com>
  8. ---
  9. Makefile.am | 10 ++++++++++
  10. 1 file changed, 10 insertions(+)
  11. diff --git a/Makefile.am b/Makefile.am
  12. index 4cb9a5c..8adcd7e 100644
  13. --- a/Makefile.am
  14. +++ b/Makefile.am
  15. @@ -26,6 +26,16 @@ check_PROGRAMS = \
  16. testparser \
  17. testrecurse
  18. +ptestdir=$(libexecdir)
  19. +install-test-data: $(check_PROGRAMS)
  20. + install -d $(DESTDIR)$(ptestdir) $(DESTDIR)$(ptestdir)/python/
  21. + for T in $(check_PROGRAMS); do \
  22. + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$T $(DESTDIR)$(ptestdir) ;\
  23. + done
  24. + cp -r $(srcdir)/test $(DESTDIR)$(ptestdir)
  25. + cp -r $(srcdir)/result $(DESTDIR)$(ptestdir)
  26. + cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python
  27. +
  28. bin_PROGRAMS = xmllint
  29. bin_SCRIPTS = xml2-config