Remove unused tests/configure.ac
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 11 Dec 2020 01:43:35 +0000 (04:43 +0300)
committerMark Wielaard <mark@klomp.org>
Fri, 11 Dec 2020 11:47:54 +0000 (12:47 +0100)
tests/configure.ac was introduced 15 years ago by commit
d7f8d0caa7a357f9f4765e5dc93255f5057eba2e.  However, the ability to build
tests as a separate project was broken by the same author 4 years later
by commit 22359e265395fd2f8267190ef97f5417770e6206, if not earlier.

An attempt to run autoreconf in tests would currently fail
with the following automake error:
automake: error: cannot open < config/eu.am: No such file or directory

Apparently, nobody builds tests as a separate project for more than 10
years, so cleanup the remains of that unused and broken code.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
ChangeLog
configure.ac
tests/ChangeLog
tests/Makefile.am
tests/configure.ac [deleted file]

index def6279..92efa22 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2020-12-11  Dmitry V. Levin  <ldv@altlinux.org>
 
+       * configure.ac (AM_CONDITIONAL): Remove HAVE_LIBASM and STANDALONE.
+
        * configure.ac: Rewrite argp check.
 
        * configure.ac (AC_MSG_FAILURE): Fix typo.
index 392f915..ed11d24 100644 (file)
@@ -577,7 +577,6 @@ dnl CPU handling library.
 AC_CONFIG_FILES([libcpu/Makefile])
 
 dnl Assembler library.
-AM_CONDITIONAL(HAVE_LIBASM, true)dnl Used in tests/Makefile.am, which see.
 AC_CONFIG_FILES([libasm/Makefile])
 
 dnl CPU-specific backend libraries.
@@ -587,7 +586,6 @@ dnl Tools.
 AC_CONFIG_FILES([src/Makefile po/Makefile.in])
 
 dnl Test suite.
-AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
 AC_CONFIG_FILES([tests/Makefile])
 
 dnl pkgconfig files
index f5adc31..a3813dd 100644 (file)
@@ -1,3 +1,12 @@
+2020-12-11  Dmitry V. Levin  <ldv@altlinux.org>
+
+       * configure.ac: Remove.
+       * Makefile.am [STANDALONE]: Remove.
+       (check_PROGRAMS): Add msg_tst, system-elf-libelf-test, and $(asm_TESTS)
+       unconditionally.
+       (TESTS): Add msg_tst, system-elf-libelf-test, $(asm_TESTS), and
+       run-disasm-bpf.sh unconditionally.
+
 2020-11-23  Frank Ch. Eigler  <fche@redhat.com>
 
        * run-debuginfod-find.sh: Add sqlite error injection & stats.
index 84f6e88..3cca225 100644 (file)
 include $(top_srcdir)/config/eu.am
 BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
 
-AM_LDFLAGS =
-
-if !STANDALONE
 AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
            -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
            -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
            -I$(top_srcdir)/lib -I..
-AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
-endif
+AM_LDFLAGS = -Wl,-rpath-link,../libasm:../libdw:../libelf
 
 if TESTS_RPATH
 AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH)
@@ -63,7 +59,9 @@ check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
                  all-dwarf-ranges unit-info next_cfi \
                  elfcopy addsections xlate_notes elfrdwrnop \
                  dwelf_elf_e_machine_string \
-                 getphdrnum leb128 read_unaligned
+                 getphdrnum leb128 read_unaligned \
+                 msg_tst system-elf-libelf-test \
+                 $(asm_TESTS)
 
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
            asm-tst6 asm-tst7 asm-tst8 asm-tst9
@@ -186,7 +184,9 @@ TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
        run-disasm-riscv64.sh \
        run-pt_gnu_prop-tests.sh \
        run-getphdrnum.sh run-test-includes.sh \
-       leb128 read_unaligned
+       leb128 read_unaligned \
+       msg_tst system-elf-libelf-test \
+       $(asm_TESTS) run-disasm-bpf.sh
 
 if !BIARCH
 export ELFUTILS_DISABLE_BIARCH = 1
@@ -196,11 +196,6 @@ if !DEMANGLE
 export ELFUTILS_DISABLE_DEMANGLE = 1
 endif
 
-if !STANDALONE
-check_PROGRAMS += msg_tst system-elf-libelf-test
-TESTS += msg_tst system-elf-libelf-test
-endif
-
 if LZMA
 TESTS += run-readelf-s.sh run-dwflsyms.sh
 endif
@@ -209,11 +204,6 @@ if HAVE_ZSTD
 TESTS += run-readelf-compressed-zstd.sh
 endif
 
-if HAVE_LIBASM
-check_PROGRAMS += $(asm_TESTS)
-TESTS += $(asm_TESTS) run-disasm-bpf.sh
-endif
-
 if DEBUGINFOD
 check_PROGRAMS += debuginfod_build_id_find
 # With the dummy delegation doesn't work
@@ -539,10 +529,6 @@ installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
 installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
                         installed $(tests_rpath) \
                         '$(program_transform_name)'
-if STANDALONE
-TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
-LOG_COMPILER = $(installed_LOG_COMPILER)
-else !STANDALONE
 TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
                    abs_srcdir=$(abs_srcdir);  abs_builddir=$(abs_builddir); \
                    abs_top_builddir=$(abs_top_builddir); \
@@ -558,14 +544,7 @@ installcheck-local:
        $(MAKE) $(AM_MAKEFLAGS) \
                TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
                LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
-endif !STANDALONE
 
-if STANDALONE
-libdw = -ldw
-libelf = -lelf
-libasm = -lasm
-libebl = -lebl
-else !STANDALONE
 if BUILD_STATIC
 libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
 libelf = ../libelf/libelf.a -lz
@@ -577,7 +556,6 @@ libasm = ../libasm/libasm.so
 endif
 libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
 libeu = ../lib/libeu.a
-endif !STANDALONE
 
 arextract_LDADD = $(libelf)
 arsymtest_LDADD = $(libelf)
diff --git a/tests/configure.ac b/tests/configure.ac
deleted file mode 100644 (file)
index ed51920..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-dnl Process this file with autoconf to produce a configure script.
-dnl Configure input file for elfutils test suite.              -*-autoconf-*-
-dnl
-dnl Copyright (C) 2005 Red Hat, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify
-dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, version 2.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program; if not, write to the Free Software Foundation,
-dnl Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
-dnl
-AC_INIT([elfutils tests],[0.117],
-       [http://bugzilla.redhat.com/bugzilla/],
-       [elfutils-tests])
-
-AC_COPYRIGHT([Copyright (C) 2005 Red Hat, Inc.])
-AC_PREREQ(2.59)                        dnl Minimum Autoconf version required.
-
-AM_INIT_AUTOMAKE([foreign 1.7])
-
-AC_CONFIG_SRCDIR([allfcts.c])
-AC_CONFIG_FILES([Makefile])
-AC_CONFIG_HEADERS([config.h])
-
-AC_PROG_CC
-
-AC_CACHE_CHECK([for gcc with C99 support], ac_cv_c99, [dnl
-old_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -std=gnu99"
-AC_COMPILE_IFELSE([dnl
-int foo (int a) { for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; }],
-                 ac_cv_c99=yes, ac_cv_c99=no)
-CFLAGS="$old_CFLAGS"])
-AS_IF([test "x$ac_cv_c99" != xyes],
-      AC_MSG_ERROR([gcc with C99 support required]))
-
-AC_CHECK_HEADERS([libelf.h elfutils/libdw.h],,
-[AC_MSG_ERROR([elfutils-devel package not installed])])
-
-AC_CHECK_LIB([asm], [asm_begin], [have_libasm=yes], [have_libasm=no])
-AM_CONDITIONAL(HAVE_LIBASM, [test $have_libasm = yes])
-
-AM_CONDITIONAL(STANDALONE, true)
-AM_CONDITIONAL(BUILD_STATIC, false)
-AM_CONDITIONAL(TESTS_RPATH, false)
-AM_CONDITIONAL(GCOV, false)
-
-dnl Text of the config.h file.
-AH_BOTTOM([#define ELFUTILS_HEADER(name) <elfutils/lib##name.h>])
-
-AC_OUTPUT