summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-11-16 01:33:38 +0000
committerRoland McGrath <[email protected]>2005-11-16 01:33:38 +0000
commit1b8b446a794ac4babfd687ca48de32e5f4aaa539 (patch)
treeb619a87dfff2b1fb667778f2699daa29a77f74c3 /tests/Makefile.am
parentfd856b5865368a894c178be0d2ad7285db5b3150 (diff)
2005-11-15 Roland McGrath <[email protected]>
* configure.ac: Add --enable-tests-rpath option. tests/ 2005-11-15 Roland McGrath <[email protected]> * Makefile.am (BUILD_RPATH): New variable. [TESTS_RPATH] (AM_LDFLAGS): Pass -rpath option using that value. (tests_rpath): New variable. (installcheck-local): Pass it to test-wrapper.sh. * test-wrapper.sh: In "installed" format, take yes/no value for elfutils_tests_rpath, which export. When running a test binary for installcheck, exit 77. * test-subr.sh (installed_testrun): When running a test binary for installcheck, exit 77 if $elfutils_tests_rpath = yes.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am22
1 files changed, 19 insertions, 3 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 01d7b6ad..0a80f634 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -16,17 +16,24 @@ DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE
if MUDFLAP
AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\
$(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
-AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libebl
+BUILD_RPATH = \$$ORIGIN/../libebl
else
AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \
$(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2)
-AM_LDFLAGS = -Wl,-rpath,\$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
+BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../libebl:\$$ORIGIN/../libelf
endif
INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
-I$(top_srcdir)/libdwfl \
-I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
-I$(top_srcdir)/lib -I..
+if TESTS_RPATH
+AM_LDFLAGS = -Wl,-rpath,$(BUILT_RPATH)
+tests_rpath = yes
+else
+tests_rpath = no
+endif
+
noinst_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
showptable update1 update2 update3 update4 test-nlist \
show-die-info get-files get-lines get-pubnames \
@@ -73,7 +80,16 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
testfile20.bz2 testfile20.index.bz2 \
testfile21.bz2 testfile21.index.bz2 \
testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
- coverage.sh
+ coverage.sh test-subr.sh test-wrapper.sh
+
+TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+ ../libdw:../libebl:../libelf:../libasm
+
+installcheck-local:
+ $(MAKE) $(AM_MAKEFLAGS) TESTS_ENVIRONMENT='$(srcdir)/test-wrapper.sh \
+ installed $(tests_rpath) \
+ $(program_transform_name)' \
+ check-TESTS
if MUDFLAP
static_build=yes