summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace/strace/Makefile-ptest.patch
blob: 4cef0c0127f347aea13c75a192fb2c1bebe389f8 (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
From 205e7661822987825c7149ada4eefdc5368828ce Mon Sep 17 00:00:00 2001
From: Gabriel Barbu <gabriel.barbu@enea.com>
Date: Thu, 25 Jul 2013 15:28:33 +0200
Subject: [PATCH] strace: Add ptest

Upstream-Status: Inappropriate

Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>

---
 tests/Makefile.am | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/Makefile.am b/tests/Makefile.am
index b8efce8..fa9a1af 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,6 +16,7 @@ SIZEOF_LONG = @SIZEOF_LONG@
 MPERS_NAME =
 MPERS_CC_FLAGS =
 ARCH_MFLAGS =
+TEST_SUITE_LOG = test-suite.log
 AM_CFLAGS = $(WARN_CFLAGS)
 AM_CPPFLAGS = $(ARCH_MFLAGS) \
 	      -I$(builddir) \
@@ -692,3 +693,22 @@ BUILT_SOURCES = ksysent.h
 CLEANFILES = ksysent.h
 
 include ../src/scno.am
+
+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
+
+install-ptest:
+	install -d $(DESTDIR)/src
+	install $(BUILDDIR)/src/strace $(DESTDIR)/src
+	install $(srcdir)/../src/strace-log-merge $(DESTDIR)/src
+	install -d $(DESTDIR)/$(TESTDIR)
+	cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
+	sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
+	sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
+	for file in $(check_PROGRAMS); do \
+		install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
+	done
+	for file in $(EXTRA_DIST); do \
+		install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
+		#sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
+	done
+	for i in net scm_rights-fd rt_sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done