From: Petr Machata Date: Wed, 18 Aug 2010 17:14:19 +0000 (+0200) Subject: dwarflint: Add test suite X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49367888c077cce134f06515751ee03c9939c299;p=thirdparty%2Felfutils.git dwarflint: Add test suite ... the first test being for the bugfix of the previous commit --- diff --git a/dwarflint/Makefile.am b/dwarflint/Makefile.am index cb0d2b8fd..a3bfed6bb 100644 --- a/dwarflint/Makefile.am +++ b/dwarflint/Makefile.am @@ -66,6 +66,26 @@ dwarflint_SOURCES = main.cc \ check_dups_abstract_origin.cc \ ../src/dwarfstrings.c +TESTS = tests/run-debug_abbrev-duplicate-attribute.sh + +EXTRA_DIST = tests/run-debug_abbrev-duplicate-attribute.sh tests/run-debug_abbrev-duplicate-attribute.bz2 + +installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ + bindir=$(DESTDIR)$(bindir) \ + $(top_srcdir)/tests/test-wrapper.sh \ + installed $(tests_rpath) \ + $(program_transform_name) +if STANDALONE +TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT) +else !STANDALONE +TESTS_ENVIRONMENT = $(top_srcdir)/tests/test-wrapper.sh \ + ../libdw:../backends:../libelf:../libasm + +installcheck-local: + $(MAKE) $(AM_MAKEFLAGS) \ + TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS +endif !STANDALONE + if BUILD_STATIC libasm = ../libasm/libasm.a libdw = ../libdw/libdw.a $(zip_LIBS) $(libelf) $(libebl) -ldl diff --git a/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2 b/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2 new file mode 100644 index 000000000..119c39968 Binary files /dev/null and b/dwarflint/tests/debug_abbrev-duplicate-attribute.bz2 differ diff --git a/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh b/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh new file mode 100755 index 000000000..a750863b7 --- /dev/null +++ b/dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh @@ -0,0 +1,37 @@ +#! /bin/sh +# Copyright (C) 2010 Red Hat, Inc. +# This file is part of Red Hat elfutils. +# +# Red Hat elfutils 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; version 2 of the License. +# +# Red Hat elfutils 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 Red Hat elfutils; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA. +# +# Red Hat elfutils is an included package of the Open Invention Network. +# An included package of the Open Invention Network is a package for which +# Open Invention Network licensees cross-license their patents. No patent +# license is granted, either expressly or impliedly, by designation as an +# included package. Should you wish to participate in the Open Invention +# Network licensing program, please visit www.openinventionnetwork.com +# . + +. $srcdir/../tests/test-subr.sh + +srcdir=$srcdir/tests + +testfiles debug_abbrev-duplicate-attribute + +testrun_compare ./dwarflint debug_abbrev-duplicate-attribute <