From 49367888c077cce134f06515751ee03c9939c299 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 18 Aug 2010 19:14:19 +0200 Subject: [PATCH] dwarflint: Add test suite ... the first test being for the bugfix of the previous commit --- dwarflint/Makefile.am | 20 ++++++++++ .../debug_abbrev-duplicate-attribute.bz2 | Bin 0 -> 616 bytes .../run-debug_abbrev-duplicate-attribute.sh | 37 ++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 dwarflint/tests/debug_abbrev-duplicate-attribute.bz2 create mode 100755 dwarflint/tests/run-debug_abbrev-duplicate-attribute.sh 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 0000000000000000000000000000000000000000..119c39968c88e68b468d8fcb0db36cf57d855436 GIT binary patch literal 616 zc-jGI0+;u4zyaqJ zYcOf0Pe|H?^q!L@OlX=h4FJ#vng)OdfW*+rplF1dJq0~aX(yx_8ZrRT3?Ycb4F*8d zKr#**8Zv0nqfHEqh7blo41-Mo05S$Z5+s72no}}^X$=i9O$?1O9)vKMCX4`v)G!Te zWm&eywZIgK)Mv7;RR6gmrZ--Xgvlg7lGPIT>-~4zuGqrG1W_`8RzRWVDKO9RV;Jm; zPsEgzWkR`N+P6TaE5}^Plfk^kA zzkAXa2g9aXiNr}OsWnVI{8I$7h}CMLPZN$;7-BknPAh4$Jk}+VQ=UTyLq_{PjSE_U zASoCkq}7`-ZS_0$iE4Got$F?P6)5u#hFZ$D2%nP^I zrD>dJDa>RZK)5l71z18-Kr++_q?%QgCQgkK?mO{fU6B=ro%W*qqp0P;8D?or29Xd! z3{gg$7GG!uA86xvI^)WyFuk214s0oiEYT^pVgZ3)oem6%H)C8yl_aOKaS1V?NNyH5 zACI_3ZaDU3C!F|{b20u56n)}6tv#jr>+R+>M*#oUoj6eK$1Sc*WC C91&mu literal 0 Hc-jL100001 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 <