blob: 2b76e8a111895b8664b90d5834884aecd241cc3f [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001strace: Add ptest
2
3Upstream-Status: Inappropriate
4
5Signed-off-by: Gabriel Barbu <gabriel.barbu@enea.com>
6Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
7---
8 configure.ac | 2 +-
9 tests/Makefile.am | 18 ++++++++++++++++++
10 2 files changed, 19 insertions(+), 1 deletion(-)
11
12diff --git a/configure.ac b/configure.ac
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013--- a/configure.ac
14+++ b/configure.ac
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050015@@ -36,7 +36,7 @@ AC_INIT([strace],
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016 AC_CONFIG_SRCDIR([strace.c])
17 AC_CONFIG_AUX_DIR([.])
18 AC_CONFIG_HEADERS([config.h])
Patrick Williamsc0f7c042017-02-23 20:41:17 -060019-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
20+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 AM_MAINTAINER_MODE
22 AC_CANONICAL_HOST
23
24diff --git a/tests/Makefile.am b/tests/Makefile.am
Patrick Williamsc0f7c042017-02-23 20:41:17 -060025index 9023029..e1917fa 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026--- a/tests/Makefile.am
27+++ b/tests/Makefile.am
Patrick Williamsc0f7c042017-02-23 20:41:17 -060028@@ -784,3 +784,21 @@ ksysent.h: $(srcdir)/ksysent.sed
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030 BUILT_SOURCES = ksysent.h
31 CLEANFILES = ksysent.h $(TESTS:=.tmp)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032+
33+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
34+
35+install-ptest:
36+ install $(BUILDDIR)/strace $(DESTDIR)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050037+ install $(srcdir)/../strace-log-merge $(DESTDIR)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050038+ install -d $(DESTDIR)/$(TESTDIR)
39+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
40+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
41+ sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
42+ for file in $(check_PROGRAMS); do \
43+ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
44+ done
45+ for file in $(EXTRA_DIST); do \
46+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
47+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
48+ done
49+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done