From 3381232bab7217b9cb47e7cc765c8380192069b0 Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Fri, 17 Oct 2025 14:15:36 +0800
Subject: [PATCH] add yocto-specific install-ptest target

Add a target to install the test suite.

Upstream-Status: Inappropriate
Signed-off-by: Ross Burton <ross.burton@arm.com>

Do not install python test cases
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 Makefile.am | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 19ec305..64bf28a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,6 +29,14 @@ check_PROGRAMS = \
 	testparser \
 	testrecurse
 
+ptestdir=$(libexecdir)
+install-test-data: $(check_PROGRAMS)
+	for T in $(check_PROGRAMS); do \
+		$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$T $(DESTDIR)$(ptestdir) ;\
+	done
+	cp -r $(srcdir)/test $(DESTDIR)$(ptestdir)
+	cp -r $(srcdir)/result $(DESTDIR)$(ptestdir)
+
 bin_PROGRAMS = xmllint
 
 bin_SCRIPTS = xml2-config
-- 
2.34.1

