summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/gnutls/gnutls/Add-ptest-support.patch
blob: 1152d3797f4f179d71fa203fae294dee4deabf02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
From ff6a345235b2585c261752e47a749228672b07dc Mon Sep 17 00:00:00 2001
From: Ravineet Singh <ravineet.a.singh@est.tech>
Date: Tue, 10 Jan 2023 16:11:10 +0100
Subject: [PATCH] gnutls: add ptest support

Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Ravineet Singh <ravineet.a.singh@est.tech>
---
 Makefile.am       | 3 +++
 configure.ac      | 2 ++
 tests/Makefile.am | 6 ++++++
 3 files changed, 11 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 843193f..816b09f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -191,6 +191,9 @@ dist-hook:
 	mv ChangeLog $(distdir)
 	touch -c $(distdir)/doc/*.html $(distdir)/doc/*.pdf $(distdir)/doc/*.info
 
+install-ptest:
+	 $(MAKE) -C tests DESTDIR=$(DESTDIR)/tests $@
+
 .PHONY: abi-check abi-dump-versioned abi-dump-latest pic-check symbol-check local-code-coverage-output files-update AUTHORS
 
 include $(top_srcdir)/cligen/cligen.mk
diff --git a/configure.ac b/configure.ac
index d6e03cf..e3f15fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1213,6 +1213,8 @@ AC_SUBST(LIBGNUTLS_CFLAGS)
 
 AM_CONDITIONAL(NEEDS_LIBRT, test "$gnutls_needs_librt" = "yes")
 
+AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS])
+
 AC_DEFINE([GNUTLS_INTERNAL_BUILD], 1, [We allow temporarily usage of deprecated functions - until they are removed.])
 
 hw_features=
diff --git a/tests/Makefile.am b/tests/Makefile.am
index fb9e55a..c2d226a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -658,6 +658,12 @@ SH_LOG_COMPILER = $(SHELL)
 AM_VALGRINDFLAGS = --suppressions=$(srcdir)/suppressions.valgrind
 LOG_COMPILER = $(LOG_VALGRIND)
 
+install-ptest: $(check_PROGRAMS)
+	@$(INSTALL) -d $(DESTDIR)
+	@for file in $^; do \
+		$(INSTALL_PROGRAM) $$file $(DESTDIR) ; \
+	done
+
 distclean-local:
 	rm -rf softhsm-*.db softhsm-*.config *.tmp tmp-* x509-crt-list-import-url.config.db port.lock.d