[Ltrace-devel] [PATCH 4/9] Convert testsuite to use autotools
Zachary T Welch
zwelch at codesourcery.com
Fri Nov 5 22:03:00 UTC 2010
Punts all of the dejagnu magic into automake.
Signed-off-by: Zachary T Welch <zwelch at codesourcery.com>
---
Makefile.am | 4 +-
configure.ac | 4 ++
testsuite/Makefile | 71 ----------------------------------
testsuite/Makefile.am | 26 ++++++++++++
testsuite/ltrace.main/Makefile | 33 ----------------
testsuite/ltrace.main/Makefile.am | 21 ++++++++++
testsuite/ltrace.minor/Makefile | 36 -----------------
testsuite/ltrace.minor/Makefile.am | 23 +++++++++++
testsuite/ltrace.torture/Makefile | 33 ----------------
testsuite/ltrace.torture/Makefile.am | 21 ++++++++++
10 files changed, 98 insertions(+), 174 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 6dd6978..9b32f51 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,7 @@
SUBDIRS = \
- sysdeps
+ sysdeps \
+ . \
+ testsuite
AM_CPPFLAGS = \
$(libelf_CFLAGS) \
diff --git a/configure.ac b/configure.ac
index 21059dc..8335b10 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,5 +188,9 @@ AC_CONFIG_FILES([
sysdeps/linux-gnu/s390/Makefile
sysdeps/linux-gnu/sparc/Makefile
sysdeps/linux-gnu/x86_64/Makefile
+ testsuite/Makefile
+ testsuite/ltrace.main/Makefile
+ testsuite/ltrace.minor/Makefile
+ testsuite/ltrace.torture/Makefile
])
AC_OUTPUT
diff --git a/testsuite/Makefile b/testsuite/Makefile
deleted file mode 100644
index b78807e..0000000
--- a/testsuite/Makefile
+++ /dev/null
@@ -1,71 +0,0 @@
-# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 1, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-AUTOMAKE_OPTIONS = dejagnu
-EXPECT = expect
-RUNTEST = runtest
-CC = @CC@
-
-srcdir = .
-RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)
-
-CLEANFILES = *.log *.sum site.bak setval.tmp site.exp
-
-SUBDIRS = ltrace.main ltrace.minor ltrace.torture
-
-#all: all-recursive
-
-.SUFFIXES:
-
-check-DEJAGNU: site.exp
- EXPECT=$(EXPECT); export EXPECT;
- @$(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS);
-
-site.exp:
- @echo 'Making a new site.exp file...'
- @echo '## these variables are automatically generated by make ##' >site.tmp
- @echo '# Do not edit here. If you wish to override these values' >>site.tmp
- @echo '# edit the last section' >>site.tmp
- @echo 'set srcdir $(srcdir)' >>site.tmp
- @echo "set objdir `pwd`" >>site.tmp
- @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
- @test ! -f site.exp || \
- sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
- @-rm -f site.bak
- @test ! -f site.exp || mv site.exp site.bak
- @mv site.tmp site.exp
-
-check: check-DEJAGNU
-
-clean:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making clean in $$subdir"; \
- (cd $$subdir && $(MAKE) clean ) done;
-
- -rm -f $(CLEANFILES)
-
-distclean:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- echo "Making clean in $$subdir"; \
- (cd $$subdir && $(MAKE) distclean ) done;
- -rm -f $(CLEANFILES)
-
-.PHONY: $(RECURSIVE_TARGETS) check clean distclean realclean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
new file mode 100644
index 0000000..9b9c351
--- /dev/null
+++ b/testsuite/Makefile.am
@@ -0,0 +1,26 @@
+# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+AUTOMAKE_OPTIONS = dejagnu
+
+RUNTESTDEFAULTFLAGS = --srcdir $(srcdir)
+
+SUBDIRS = ltrace.main ltrace.minor ltrace.torture
+
+CLEANFILES = *.o *.so *.log *.sum *.ltrace site.bak setval.tmp site.exp
+
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/testsuite/ltrace.main/Makefile b/testsuite/ltrace.main/Makefile
deleted file mode 100644
index 449214a..0000000
--- a/testsuite/ltrace.main/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 1, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-CLEANFILES = *.log *.sum site.bak setval.tmp site.exp
-
-.SUFFIXES:
-clean:
- -rm -f main main-internal system_calls signals parameters
- -rm -f *.o *.so
- -rm -f *.ltrace
- -rm -f $(CLEANFILES)
-distclean: clean
-
-
-.PHONY: $(RECURSIVE_TARGETS) check clean distclean realclean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/testsuite/ltrace.main/Makefile.am b/testsuite/ltrace.main/Makefile.am
new file mode 100644
index 0000000..d53deeb
--- /dev/null
+++ b/testsuite/ltrace.main/Makefile.am
@@ -0,0 +1,21 @@
+# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+CLEANFILES = *.o *.so *.log *.sum *.ltrace setval.tmp \
+ main main-internal parameters signals system_calls
+
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/testsuite/ltrace.minor/Makefile b/testsuite/ltrace.minor/Makefile
deleted file mode 100644
index cd4914f..0000000
--- a/testsuite/ltrace.minor/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 1, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-CLEANFILES = *.log *.sum site.bak setval.tmp site.exp
-
-.SUFFIXES:
-clean:
- -rm -f demangle trace-fork trace-clone trace-exec trace-exec1
- -rm -f time-record-tt time-record-ttt time-record-T
- -rm -f attach-process count-record
- -rm -f print-instruction-pointer
- -rm -f *.o *.so
- -rm -f *.ltrace
- -rm -f $(CLEANFILES)
-distclean: clean
-
-
-.PHONY: $(RECURSIVE_TARGETS) check clean distclean realclean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/testsuite/ltrace.minor/Makefile.am b/testsuite/ltrace.minor/Makefile.am
new file mode 100644
index 0000000..00e3d24
--- /dev/null
+++ b/testsuite/ltrace.minor/Makefile.am
@@ -0,0 +1,23 @@
+# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+CLEANFILES = *.o *.so *.log *.sum *.ltrace setval.tmp \
+ attach-process count-record demangle print-instruction-pointer \
+ time-record-T time-record-tt time-record-ttt trace-clone \
+ trace-exec trace-exec1 trace-fork
+
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/testsuite/ltrace.torture/Makefile b/testsuite/ltrace.torture/Makefile
deleted file mode 100644
index bb4baa0..0000000
--- a/testsuite/ltrace.torture/Makefile
+++ /dev/null
@@ -1,33 +0,0 @@
-# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 1, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-
-CLEANFILES = *.log *.sum site.bak setval.tmp site.exp
-
-.SUFFIXES:
-clean:
- -rm -f signals
- -rm -f *.o *.so
- -rm -f *.ltrace
- -rm -f $(CLEANFILES)
-distclean: clean
-
-
-.PHONY: $(RECURSIVE_TARGETS) check clean distclean realclean
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/testsuite/ltrace.torture/Makefile.am b/testsuite/ltrace.torture/Makefile.am
new file mode 100644
index 0000000..ee89e9c
--- /dev/null
+++ b/testsuite/ltrace.torture/Makefile.am
@@ -0,0 +1,21 @@
+# Copyright (C) 1992 - 2001 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 1, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+
+CLEANFILES = *.o *.so *.log *.sum *.ltrace setval.tmp \
+ signals
+
+MAINTAINERCLEANFILES = Makefile.in
--
1.7.2.2
More information about the Ltrace-devel
mailing list