blob: 876c2d8629bf3cae71ae1382e7d300317be29085 [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
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013index b2b03c6..464a9dc 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014--- a/configure.ac
15+++ b/configure.ac
Brad Bishop6e60e8b2018-02-01 10:27:11 -050016@@ -39,7 +39,7 @@ AC_COPYRIGHT([Copyright (C) 1999-2017 The strace developers.])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050017 AC_CONFIG_SRCDIR([strace.c])
18 AC_CONFIG_AUX_DIR([.])
19 AC_CONFIG_HEADERS([config.h])
Patrick Williamsc0f7c042017-02-23 20:41:17 -060020-AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules parallel-tests])
21+AM_INIT_AUTOMAKE([foreign nostdinc dist-xz silent-rules serial-tests])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 AM_EXTRA_RECURSIVE_TARGETS([check-valgrind])
Patrick Williamsc124f4f2015-09-15 14:41:29 -050023 AM_MAINTAINER_MODE
24 AC_CANONICAL_HOST
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025diff --git a/tests/Makefile.am b/tests/Makefile.am
Brad Bishop6e60e8b2018-02-01 10:27:11 -050026index 311d3bb..72f9022 100644
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027--- a/tests/Makefile.am
28+++ b/tests/Makefile.am
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029@@ -960,3 +960,21 @@ $(objects): scno.h
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050030 CLEANFILES = ksysent.h $(TESTS:=.tmp)
Brad Bishop6e60e8b2018-02-01 10:27:11 -050031
32 include ../scno.am
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033+
34+buildtest-TESTS: $(check_PROGRAMS) $(TESTS)
35+
36+install-ptest:
37+ install $(BUILDDIR)/strace $(DESTDIR)
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050038+ install $(srcdir)/../strace-log-merge $(DESTDIR)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039+ install -d $(DESTDIR)/$(TESTDIR)
40+ cp $(BUILDDIR)/$(TESTDIR)/Makefile $(DESTDIR)/$(TESTDIR)
41+ sed -i -e 's/^Makefile:/_Makefile:/' $(DESTDIR)/$(TESTDIR)/Makefile
42+ sed -i -e 's/bash/sh/' $(DESTDIR)/$(TESTDIR)/Makefile
43+ for file in $(check_PROGRAMS); do \
44+ install $(BUILDDIR)/$(TESTDIR)/$$file $(DESTDIR)/$(TESTDIR); \
45+ done
46+ for file in $(EXTRA_DIST); do \
47+ install $(srcdir)/$$file $(DESTDIR)/$(TESTDIR); \
48+ sed -i -e 's/$${srcdir=.}/./g' $(DESTDIR)/$(TESTDIR)/$$file; \
49+ done
50+ for i in net net-fd scm_rights-fd sigaction; do sed -i -e 's/$$srcdir/./g' $(DESTDIR)/$(TESTDIR)/$$i.test; done