]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Enable automake parallel-tests for make check.
authorMark Wielaard <mjw@redhat.com>
Fri, 26 Apr 2013 21:44:25 +0000 (23:44 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 26 Apr 2013 22:15:29 +0000 (00:15 +0200)
The parallel-tests option was introduced in automake 1.11 and is the
default since automake 1.13. All tests can now be ran in parallel with
make check -j. To enable this all tests are ran in their own temporary
directory so they don't stomp on each others input or output files.
On my machine (4 cores) make check takes ~20 seconds, but now with
make check -j8 takes only ~4 seconds.

ChangeLog:

       * configure.ac (AM_INIT_AUTOMAKE): Request parallel-tests.

tests/ChangeLog:

       * Makefile.am (installed_TESTS_ENVIRONMENT): Export environment,
       remove wrapper.
       (TESTS_ENVIRONMENT): Likewise.
       (installed_LOG_COMPILER): New variable defining wrapper.
       (LOG_COMPILER): Likewise.
       * run-*.sh: Fixup location of input and output files.
       * test-subr.sh: Create test_dir, pushd to execute test in.
       (trap): Remove test_dir.
       (testfiles): Use abs_srcdir.
       (installed_testrun): Match on abs_builddir or abs_top_builddir.
       (self_test_files): Adjust path.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
70 files changed:
ChangeLog
configure.ac
tests/ChangeLog
tests/Makefile.am
tests/run-addrname-test.sh
tests/run-addrscopes.sh
tests/run-alldts.sh
tests/run-allfcts.sh
tests/run-allregs.sh
tests/run-arextract.sh
tests/run-arsymtest.sh
tests/run-bug1-test.sh
tests/run-disasm-x86-64.sh
tests/run-disasm-x86.sh
tests/run-dwarf-getmacros.sh
tests/run-dwarf-getstring.sh
tests/run-dwfl-addr-sect.sh
tests/run-dwfl-bug-offline-rel.sh
tests/run-dwfl-report-elf-align.sh
tests/run-dwfllines.sh
tests/run-dwflsyms.sh
tests/run-early-offscn.sh
tests/run-ecp-test.sh
tests/run-ecp-test2.sh
tests/run-elf_cntl_gelf_getshdr.sh
tests/run-elflint-self.sh
tests/run-elflint-test.sh
tests/run-find-prologues.sh
tests/run-funcscopes.sh
tests/run-get-aranges.sh
tests/run-get-files.sh
tests/run-get-lines.sh
tests/run-get-pubnames.sh
tests/run-line2addr.sh
tests/run-low_high_pc.sh
tests/run-macro-test.sh
tests/run-native-test.sh
tests/run-nm-self.sh
tests/run-prelink-addr-test.sh
tests/run-ranlib-test.sh
tests/run-ranlib-test2.sh
tests/run-readelf-aranges.sh
tests/run-readelf-d.sh
tests/run-readelf-dwz-multi.sh
tests/run-readelf-gdb_index.sh
tests/run-readelf-line.sh
tests/run-readelf-loc.sh
tests/run-readelf-macro.sh
tests/run-readelf-mixed-corenote.sh
tests/run-readelf-s.sh
tests/run-readelf-self.sh
tests/run-readelf-test1.sh
tests/run-readelf-test2.sh
tests/run-readelf-test3.sh
tests/run-readelf-test4.sh
tests/run-readelf-twofiles.sh
tests/run-readelf-vmcoreinfo.sh
tests/run-rerequest_tag.sh
tests/run-show-abbrev.sh
tests/run-show-die-info.sh
tests/run-strings-test.sh
tests/run-strip-groups.sh
tests/run-strip-reloc.sh
tests/run-strip-test.sh
tests/run-test-archive64.sh
tests/run-test-flag-nobits.sh
tests/run-typeiter.sh
tests/run-unstrip-n.sh
tests/run-unstrip-test.sh
tests/test-subr.sh

index 26b41c274fd066e348c1a4c755c1ea02010ea29e..1fdcb588e82511513328eb154569bd0209de929b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-26  Mark Wielaard  <mjw@redhat.com>
+
+       * configure.ac (AM_INIT_AUTOMAKE): Request parallel-tests.
+
 2013-04-25  Mark Wielaard  <mjw@redhat.com>
 
        * .gitignore: Add config/test-driver as installed by automake 1.13.
index fd30c27ff23226d34af456439324f3712742fd81..d7c75ce02a2509c914757e928ede400bca0ee05e 100644 (file)
@@ -26,7 +26,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2012 Red Hat, Inc.])
 AC_PREREQ(2.63)                        dnl Minimum Autoconf version required.
 
 dnl We use GNU make extensions; automake 1.10 defaults to -Wportability.
-AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip])
+AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests])
 AM_MAINTAINER_MODE
 
 dnl Unique ID for this build.
index 2a065ee8ba87c611db1619bdf3c2332d94baedb7..2cbe8012cce9adc84f5765df9244acc72112eaf0 100644 (file)
@@ -1,3 +1,17 @@
+2013-04-26  Mark Wielaard  <mjw@redhat.com>
+
+       * Makefile.am (installed_TESTS_ENVIRONMENT): Export environment,
+       remove wrapper.
+       (TESTS_ENVIRONMENT): Likewise.
+       (installed_LOG_COMPILER): New variable defining wrapper.
+       (LOG_COMPILER): Likewise.
+       * run-*.sh: Fixup location of input and output files.
+       * test-subr.sh: Create test_dir, pushd to execute test in.
+       (trap): Remove test_dir.
+       (testfiles): Use abs_srcdir.
+       (installed_testrun): Match on abs_builddir or abs_top_builddir.
+       (self_test_files): Adjust path.
+
 2013-04-24  Mark Wielaard  <mjw@redhat.com>
 
        * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
index e10da8a4ba339db3f7d52cce5595ce0568062c77..4b57703597a8dc8023286826e97b6d5779fdb788 100644 (file)
@@ -201,26 +201,41 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile-dwfl-report-elf-align-shlib.so.bz2
 
 if USE_VALGRIND
-valgrind_cmd="valgrind -q --trace-children=yes --error-exitcode=1 --run-libc-freeres=no"
+valgrind_cmd='valgrind -q --trace-children=yes --error-exitcode=1 --run-libc-freeres=no'
 endif
 
-installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
-                             bindir=$(DESTDIR)$(bindir) \
-                             LC_ALL=C LANG=C \
-                             VALGRIND_CMD=$(valgrind_cmd) \
-                             $(srcdir)/test-wrapper.sh \
-                             installed $(tests_rpath) \
-                             $(program_transform_name)
+
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
+                             bindir=$(DESTDIR)$(bindir); \
+                             LC_ALL=C; LANG=C; \
+                             VALGRIND_CMD=$(valgrind_cmd); \
+                             abs_srcdir=$(abs_srcdir); \
+                             abs_builddir=$(abs_builddir); \
+                             abs_top_builddir=$(abs_top_builddir); \
+                             export abs_srcdir; export abs_builddir; \
+                             export abs_top_builddir; \
+                             export libdir; export bindir; \
+                             export LC_ALL; export LANG; export VALGRIND_CMD;
+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) \
-                   $(srcdir)/test-wrapper.sh \
-                   ../libdw:../backends:../libelf:../libasm
+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); \
+                   export abs_srcdir; export abs_builddir; \
+                   export abs_top_builddir; \
+                   export LC_ALL; export LANG; export VALGRIND_CMD;
+LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
+              $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm
 
 installcheck-local:
        $(MAKE) $(AM_MAKEFLAGS) \
-               TESTS_ENVIRONMENT='$(installed_TESTS_ENVIRONMENT)' check-TESTS
+               TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
+               LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
 endif !STANDALONE
 
 if MUDFLAP
index 99abf9dbccfc6dff3b633ed85576394f3b200fae..9351fb2a05d27c105b5e4ecb7955a472ebddfe17 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile34 testfile38 testfile41 testfile49
 
-testrun_compare ../src/addr2line -f -e testfile34 \
+testrun_compare ${abs_top_builddir}/src/addr2line -f -e testfile34 \
                                 0x08048074 0x08048075 0x08048076 \
                                 0x08049078 0x08048080 0x08049080 <<\EOF
 foo
@@ -36,7 +36,7 @@ _end
 ??:0
 EOF
 
-testrun_compare ../src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF
 t1_global_outer+0x2
 ??:0
 t2_global_symbol+0x2
@@ -47,7 +47,7 @@ t3_global_after_0+0x1
 ??:0
 EOF
 
-testrun_compare ../src/addr2line -S -e testfile41 0x1 0x104 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile41 0x1 0x104 <<\EOF
 small_global_at_large_global+0x1
 ??:0
 small_global_first_at_large_global+0x1
@@ -69,7 +69,7 @@ cat > testmaps <<EOF
 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
 EOF
 
-testrun_compare ../src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF
 caller+0x14
 /home/drepper/local/elfutils-build/20050425/v.c:11
 foo+0xb
@@ -135,7 +135,7 @@ EOF
 #      nop #10
 #      .size local_outer, . - local_outer
 #      nop #11
-testrun_compare ../src/addr2line -S -e testfile49 \
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile49 \
                0 1 2 3 4 5 6 7 8 9 \
                0x100 0x101 0x102 0x103 0x104 0x105 \
                0x106 0x107 0x108 0x109 0x10a 0x10b \
@@ -277,7 +277,7 @@ EOF
 #      local l0local2, 0
 #      offset 12
 testfiles testfile64
-testrun_compare ../src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF
 gglobal2
 ??:0
 g0global2
@@ -293,13 +293,13 @@ l0local2
 EOF
 
 testfiles testfile65
-testrun_compare ../src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF
 __vdso_time
 ??:0
 EOF
 
 testfiles testfile69.core testfile69.so
-testrun_compare ../src/addr2line --core=./testfile69.core -S 0x7f0bc6a33535 0x7f0bc6a33546 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line --core=./testfile69.core -S 0x7f0bc6a33535 0x7f0bc6a33546 <<\EOF
 libstatic+0x9
 ??:0
 libglobal+0x9
@@ -307,11 +307,11 @@ libglobal+0x9
 EOF
 
 testfiles testfile70.exec testfile70.core
-testrun_compare ../src/addr2line -S -e testfile70.exec --core=testfile70.core 0x7ff2cfe9b6b5 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile70.exec --core=testfile70.core 0x7ff2cfe9b6b5 <<\EOF
 main+0x9
 ??:0
 EOF
-testrun_compare ../src/addr2line -S --core=testfile70.core -e testfile70.exec 0x7ff2cfe9b6b5 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S --core=testfile70.core -e testfile70.exec 0x7ff2cfe9b6b5 <<\EOF
 main+0x9
 ??:0
 EOF
index 38b9d8864a0667dfe49c5b3318795bbc281bfa51..4f5c9d7fc6b51ee7b7ca7f8612ea0f73d9d78528 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile22
 
-testrun_compare ./addrscopes -e testfile22 0x8048353 <<\EOF
+testrun_compare ${abs_builddir}/addrscopes -e testfile22 0x8048353 <<\EOF
 0x8048353:
     tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837e (tests/foo.c:16)
         global                        [    be]
@@ -30,7 +30,7 @@ EOF
 test_cleanup
 
 testfiles testfile24
-testrun_compare ./addrscopes -e testfile24 0x804834e <<\EOF
+testrun_compare ${abs_builddir}/addrscopes -e testfile24 0x804834e <<\EOF
 0x804834e:
     inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048364 (/home/roland/build/stock-elfutils/inline-test.c:16)
         add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x8048350 (/home/roland/build/stock-elfutils/inline-test.c:9)
index d8b87c297b69fcafbe80a1f5b660789da0ac8bde..a405fd56519d65aec82b3893cc9a3485ee5dd0f7 100755 (executable)
@@ -18,9 +18,9 @@
 . $srcdir/test-subr.sh
 
 # This will produce "testfile-alldts" file
-testrun ./alldts
+testrun ${abs_builddir}/alldts
 
-testrun_compare ../src/readelf -d testfile-alldts <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -d testfile-alldts <<\EOF
 
 Dynamic segment contains 66 entries:
  Addr: 0x000001a0  Offset: 0x000078  Link to section: [ 0] ''
index 4d0ec61dcb988cd94e752a3e6838b0fd8d83304d..30f7dd4d42b007a0f77ee9abfa6b85e5c6c4ae31 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2 testfile8
 
-testrun_compare ./allfcts testfile testfile2 testfile8 <<\EOF
+testrun_compare ${abs_builddir}/allfcts testfile testfile2 testfile8 <<\EOF
 /home/drepper/gnu/new-bu/build/ttt/m.c:5:main
 /home/drepper/gnu/new-bu/build/ttt/b.c:4:bar
 /home/drepper/gnu/new-bu/build/ttt/f.c:3:foo
index 7790fd0fc642f34d1b26a8cd025e57882071f864..885a1d135d272887e8a8f931e361530dc557063f 100755 (executable)
@@ -22,7 +22,7 @@ regs_test()
   tempfiles good.regs
   cat > good.regs
   testfiles "$@"
-  for f; do testrun_compare ./allregs -e $f < good.regs; done
+  for f; do testrun_compare ${abs_builddir}/allregs -e $f < good.regs; done
   test_cleanup
 }
 
index 668b36366100caf903c7ef3ed4062a5ed6e01456..44f4a525babb223cfb1ce8829d3c9fcf82e101cf 100755 (executable)
 
 tempfiles arextract.test
 
-archive=../libelf/libelf.a
+archive=${abs_top_builddir}/libelf/libelf.a
 if test -f $archive; then
     # The file is really available (i.e., no shared-only built).
     echo -n "Extracting symbols... $ac_c"
 
     # The files we are looking at.
-    for f in ../libelf/*.o; do
-       testrun ./arextract $archive `basename $f` arextract.test || exit 1
+    for f in ${abs_top_builddir}/libelf/*.o; do
+       testrun ${abs_builddir}/arextract $archive `basename $f` arextract.test || exit 1
        cmp $f arextract.test || {
            echo "Extraction of $1 failed"
            exit 1
index 89c782198be6d1b9c9e598504cfd22237f8df525..dc016e1feb7be4c097d26e9bd0c7340e27435642 100755 (executable)
@@ -18,7 +18,7 @@
 
 . $srcdir/test-subr.sh
 
-lib=../libelf/libelf.a
+lib=${abs_top_builddir}/libelf/libelf.a
 okfile=arsymtest.ok
 tmpfile=arsymtest.tmp
 testfile=arsymtest.test
@@ -33,7 +33,7 @@ if test -f $lib; then
     sort > $okfile
 
     # Now run our program using libelf.
-    testrun ./arsymtest $lib $tmpfile || exit 1
+    testrun ${abs_builddir}/arsymtest $lib $tmpfile || exit 1
     sort $tmpfile > $testfile
 
     # Compare the outputs.
index f6510518e3fb28c70aa5411175005e34d13a262a..1e78a18ce1c6b5cd7449aed6dd17029fd8f0b52a 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile28 testfile28.rdwr
 
-testrun ./rdwrmmap testfile28
+testrun ${abs_builddir}/rdwrmmap testfile28
 
 cmp testfile28 testfile28.rdwr
 
@@ -27,7 +27,7 @@ test_cleanup
 
 testfiles testfile29 testfile29.rdwr
 
-testrun ./rdwrmmap testfile29
+testrun ${abs_builddir}/rdwrmmap testfile29
 
 cmp testfile29 testfile29.rdwr
 
index 96e14d911451ddad2f199946932ba2f4ef607498..a6be62bbc4062fa1c740a4e10550a667bff0a2f4 100755 (executable)
@@ -23,6 +23,6 @@ case "`uname -m`" in
     tempfiles testfile45.o
     testfiles testfile45.S testfile45.expect
     gcc -m64 -c -o testfile45.o testfile45.S
-    testrun_compare ../src/objdump -d testfile45.o < testfile45.expect
+    testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
     ;;
 esac
index 399664c8a743253b24de19645ef004dfa12e1e41..28a3df740c50d33bffc2e2caed4801e62fd4a827 100755 (executable)
@@ -23,6 +23,6 @@ case "`uname -m`" in
     tempfiles testfile44.o
     testfiles testfile44.S testfile44.expect
     gcc -m32 -c -o testfile44.o testfile44.S
-    testrun_compare ../src/objdump -d testfile44.o < testfile44.expect
+    testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
     ;;
 esac
index b748b0f5b133fa59d23a017623fba1ac2a11e61f..ddb58e83eb5d52a2f75896ee3ff5f4a2c1d6880e 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile51
 
-testrun_compare ./dwarf-getmacros testfile51 0xb <<\EOF
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0xb <<\EOF
 __STDC__ 1
 __STDC_HOSTED__ 1
 __GNUC__ 4
@@ -152,7 +152,7 @@ __DECIMAL_BID_FORMAT__ 1
 macro1 ble
 EOF
 
-testrun_compare ./dwarf-getmacros testfile51 0x84 <<\EOF
+testrun_compare ${abs_builddir}/dwarf-getmacros testfile51 0x84 <<\EOF
 __STDC__ 1
 __STDC_HOSTED__ 1
 __GNUC__ 4
index c765f75a579c3cb93040a9c41a2ce0feb233a5a8..f18f628200dcb0324848e8f313c0382ba73dfd5b 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile11
 
-testrun_compare ./dwarf-getstring testfile11 <<\EOF
+testrun_compare ${abs_builddir}/dwarf-getstring testfile11 <<\EOF
 _ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_charsEPwS3_S3_
 itimerspec
 _G_int32_t
index 85424fde600827bbc4153983d8076e818e4904d9..80da0081ac62a715b43337722d43e6d69d222c2d 100755 (executable)
 
 testfiles testfile43 testfile50
 
-testrun_compare ./dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF
+testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF
 address 0x64 => module "" section 4 + 0
 address 0x8 => module "" section 1 + 0x8
 address 0x98 => module "" section 7 + 0
 EOF
 
-testrun_compare ./dwfl-addr-sect -e testfile50 0x1 <<\EOF
+testrun_compare ${abs_builddir}/dwfl-addr-sect -e testfile50 0x1 <<\EOF
 address 0x1 => module "" section 1 + 0x1
 EOF
 
index 3e19a5870be72140f356f590caf0f5ffdb6b0ae4..fa476c4b4966ac722d1c8895904bdb9757e2d0e6 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile36 testfile36.debug
 
-testrun_compare ./dwflmodtest -e testfile36 <<\EOF
+testrun_compare ${abs_builddir}/dwflmodtest -e testfile36 <<\EOF
 module:                                00000000..00002308 testfile36 (null)
 module:                                00000000 DWARF 0 (no error)
 module:                                00000000..00002308 testfile36 testfile36.debug
index d032aba938f7674eb3a0c0e3ee8fdd9ec69e1905..38497532469a43e386622495c5983e9fb5736cef 100755 (executable)
@@ -38,7 +38,7 @@ testfiles testfile-dwfl-report-elf-align-shlib.so
 # 0x7f3560c92585 = 0x7f3560c92000 + 0x585
 # where 0x585 is any address inside the shlib function: 0x57c .. 0x57c + 11 -1
 
-testrun ./dwfl-report-elf-align ./testfile-dwfl-report-elf-align-shlib.so \
+testrun ${abs_builddir}/dwfl-report-elf-align ./testfile-dwfl-report-elf-align-shlib.so \
                                0x7f3560c92000 0x7f3560c92585 shlib
 
 exit 0
index df7d16ff8cd796f220521c8802eb4c1a3e6c3e84..b384de09e4af94a31fe097bc9e105455f72444c6 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./dwfllines -e testfile <<\EOF
+testrun_compare ${abs_builddir}/dwfllines -e testfile <<\EOF
 mod:  CU: [b] m.c
 0 0x804842c /home/drepper/gnu/new-bu/build/ttt/m.c:5:0
  time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
@@ -51,7 +51,7 @@ mod:  CU: [15fc] f.c
  time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
 EOF
 
-testrun_compare ./dwfllines -e testfile2 <<\EOF
+testrun_compare ${abs_builddir}/dwfllines -e testfile2 <<\EOF
 mod:  CU: [b] b.c
 0 0x10000470 /shoggoth/drepper/b.c:4:0
  time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
@@ -83,6 +83,6 @@ mod:  CU: [9e4] m.c
  time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0
 EOF
 
-testrun_on_self_quiet ./dwfllines -e
+testrun_on_self_quiet ${abs_builddir}/dwfllines -e
 
 exit 0
index 56a75804dffad23aa95cad2d8cd7596a1e4e5806..c440bf7384a43de4bccbaf79e424af90adcab403 100755 (executable)
@@ -177,21 +177,21 @@ cat > testfile.minsym.in <<\EOF
 EOF
 
 cat testfile.symtab.in \
-  | testrun_compare ./dwflsyms -e testfilebaztab
+  | testrun_compare ${abs_builddir}/dwflsyms -e testfilebaztab
 
 cat testfile.symtab.in \
-  | testrun_compare ./dwflsyms -e testfilebazdbg
+  | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdbg
 
 cat testfile.dynsym.in \
-  | testrun_compare ./dwflsyms -e testfilebazdyn
+  | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazdyn
 
 cat testfile.symtab.in \
-  | testrun_compare ./dwflsyms -e testfilebazmdb
+  | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmdb
 
 cat testfile.minsym.in \
-  | testrun_compare ./dwflsyms -e testfilebazmin
+  | testrun_compare ${abs_builddir}/dwflsyms -e testfilebazmin
 
-testrun_compare ./dwflsyms -e testfilebasmin <<\EOF
+testrun_compare ${abs_builddir}/dwflsyms -e testfilebasmin <<\EOF
    0: NOTYPE   LOCAL    (0) 0
    1: FUNC     LOCAL   foo (18) 0x400168
    2: SECTION  LOCAL    (0) 0x400120
index 55a38f9faba1281cb735ff7d73dac1f3ac2d93ef..3757bcfc5992d984fced35f83193098e246205cd 100755 (executable)
@@ -19,6 +19,6 @@
 
 testfiles testfile
 
-testrun ./early-offscn testfile 0x500
+testrun ${abs_builddir}/early-offscn testfile 0x500
 
 exit 0
index d68a873cbd741b6747c944b775fd4e7d1edc3e40..d5e376a1a7d3ef5e6d97b58f998b815a67c407c4 100755 (executable)
@@ -21,7 +21,7 @@
 testfiles testfile10
 tempfiles testfile10.tmp
 
-testrun ./ecp testfile10 testfile10.tmp
+testrun ${abs_builddir}/ecp testfile10 testfile10.tmp
 
 cmp testfile10 testfile10.tmp
 
index a9acbe9ad12cd5a70bc25c2e47327b80c9e2335c..864e0a58a45b5575e5bd9b15cc1cbd1a158277a2 100755 (executable)
@@ -21,6 +21,6 @@
 testfiles testfile2
 tempfiles testfile2.tmp
 
-testrun ./ecp testfile2 testfile2.tmp
+testrun ${abs_builddir}/ecp testfile2 testfile2.tmp
 
 exit 0
index 41a7d15bb0acf034f021b0ddc1a99539f73299cd..d134119c4789c76e25285fda1a6d06be68b4bfc6 100755 (executable)
 . $srcdir/test-subr.sh
 
 # However we open the elf file, the shdrs should be the same.
-testrun ./test-elf_cntl_gelf_getshdr READ test-elf_cntl_gelf_getshdr \
+testrun ${abs_builddir}/test-elf_cntl_gelf_getshdr READ ${abs_builddir}/test-elf_cntl_gelf_getshdr \
   > test_shdr.out
 
-testrun_compare ./test-elf_cntl_gelf_getshdr MMAP test-elf_cntl_gelf_getshdr \
+testrun_compare ${abs_builddir}/test-elf_cntl_gelf_getshdr MMAP ${abs_builddir}/test-elf_cntl_gelf_getshdr \
   < test_shdr.out
 
-testrun_compare ./test-elf_cntl_gelf_getshdr FDREAD test-elf_cntl_gelf_getshdr \
+testrun_compare ${abs_builddir}/test-elf_cntl_gelf_getshdr FDREAD ${abs_builddir}/test-elf_cntl_gelf_getshdr \
   < test_shdr.out
 
 rm -f test_shdr.out
index 4b01008725079dd42fd43016f18785d8c1eba711..013109dbb1584eb6f5095cad5e9226db9572cc7e 100755 (executable)
@@ -18,4 +18,4 @@
 
 . $srcdir/test-subr.sh
 
-testrun_on_self ../src/elflint --quiet --gnu-ld
+testrun_on_self ${abs_top_builddir}/src/elflint --quiet --gnu-ld
index 5a5c62271db8a3735726e52b567598f3e95bef91..68615b96158eca0fd6c5358a0dfb3e24d5fa8a35 100755 (executable)
 
 testfiles testfile18
 
-testrun_compare ../src/elflint --gnu-ld testfile18 <<\EOF
+testrun_compare ${abs_top_builddir}/src/elflint --gnu-ld testfile18 <<\EOF
 section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC
 EOF
 
 testfiles testfile32
-testrun ../src/elflint -q testfile32
+testrun ${abs_top_builddir}/src/elflint -q testfile32
 
 testfiles testfile33
-testrun ../src/elflint -q testfile33
+testrun ${abs_top_builddir}/src/elflint -q testfile33
 
 testfiles testfile42
-testrun ../src/elflint -q --gnu-ld testfile42
+testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testfile42
 
 testfiles testfile46
-testrun ../src/elflint -q testfile46
+testrun ${abs_top_builddir}/src/elflint -q testfile46
 
 # see also run-readelf-d.sh
 testfiles testlib_dynseg.so
-testrun ../src/elflint -q --gnu-ld testlib_dynseg.so
+testrun ${abs_top_builddir}/src/elflint -q --gnu-ld testlib_dynseg.so
 
 exit 0
index 78caa8c49f506fa9e0362e9fdb3129c095e085ea..160f07d21f9c709f87dcde33bcf5beffb8801f83 100755 (executable)
 testfiles testfile testfile11 testfile22 testfile24 \
          testfile25 testfile3 testfile4 testfile5 testfile6
 
-testrun_compare ./find-prologues -e testfile <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile <<\EOF
 main             0x000000000804842c 0x0000000008048432
 bar              0x000000000804845c 0x000000000804845f
 foo              0x0000000008048468 0x000000000804846b
 EOF
 
-testrun_compare ./find-prologues -e testfile11 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile11 <<\EOF
 main             0x00000000080489b8 0x00000000080489cd
 gnu_obj_2        0x0000000008048c9e 0x0000000008048ca4
 gnu_obj_3        0x0000000008048cd8 0x0000000008048cde
@@ -37,27 +37,27 @@ gnu_obj_1        0x0000000008048d8a 0x0000000008048d8d
 ~invalid_argument 0x0000000008048db2 0x0000000008048db8
 EOF
 
-testrun_compare ./find-prologues -e testfile22 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile22 <<\EOF
 function         0x0000000008048348 0x000000000804834e
 main             0x000000000804835b 0x0000000008048377
 EOF
 
-testrun_compare ./find-prologues -e testfile24 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile24 <<\EOF
 incr             0x0000000008048348 0x000000000804834e
 main             0x0000000008048354 0x0000000008048360
 EOF
 
-testrun_compare ./find-prologues -e testfile25 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile25 <<\EOF
 incr             0x0000000008048348 0x000000000804834c
 EOF
 
-testrun_compare ./find-prologues -e testfile3 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile3 <<\EOF
 main             0x000000000804842c 0x0000000008048433
 bar              0x0000000008048458 0x000000000804845b
 foo              0x0000000008048464 0x0000000008048467
 EOF
 
-testrun_compare ./find-prologues -e testfile4 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile4 <<\EOF
 get              0x00000000080493fc 0x0000000008049402
 main             0x0000000008049498 0x000000000804949e
 a                0x000000000804d85c 0x000000000804d85c
@@ -65,13 +65,13 @@ __tfPCc          0x000000000804d86c 0x000000000804d872
 __tfCc           0x000000000804d8a4 0x000000000804d8a4
 EOF
 
-testrun_compare ./find-prologues -e testfile5 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile5 <<\EOF
 bar              0x000000000804842c 0x000000000804842f
 foo              0x0000000008048438 0x000000000804843b
 main             0x0000000008048444 0x000000000804844a
 EOF
 
-testrun_compare ./find-prologues -e testfile6 <<\EOF
+testrun_compare ${abs_builddir}/find-prologues -e testfile6 <<\EOF
 main             0x00000000080489b8 0x00000000080489cd
 gnu_obj_2        0x0000000008048c9e 0x0000000008048ca4
 gnu_obj_3        0x0000000008048cd8 0x0000000008048cde
index a0e48c1324ebac9ab5d088b6916a627a585f3687..d236f5c3b0b8be5352a17ef720459df6b7604dd4 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile25
 
-testrun_compare ./funcscopes -e testfile25 incr <<\EOF
+testrun_compare ${abs_builddir}/funcscopes -e testfile25 incr <<\EOF
 testfile25: 0x8048000 .. 0x8049528
     inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9)
         incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9)
index f3949f47045cb9a94dbe6aa9b52329e049e55df2..62cae5f8053eba952b09c9b7cd4e919ed37d794a 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./get-aranges testfile testfile2 <<\EOF
+testrun_compare ${abs_builddir}/get-aranges testfile testfile2 <<\EOF
 0x804842b: not in range
 CU name: "m.c"
 CU name: "m.c"
index 6eadcd555749ec307ccac3fcaa0bfa2d83037240..a2f2373b025cf189f4fd19b3554eedab7e9bac9e 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./get-files testfile testfile2 <<\EOF
+testrun_compare ${abs_builddir}/get-files testfile testfile2 <<\EOF
 cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191
  dirs[0] = "/home/drepper/gnu/new-bu/build/ttt"
  file[0] = "???"
index 8c8c71e4f57e49b577b627aeb988597ca2a65aee..5a220cab7bb57c175571846b64992b337bf6e59f 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./get-lines testfile testfile2 <<\EOF
+testrun_compare ${abs_builddir}/get-lines testfile testfile2 <<\EOF
 cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191
  5 lines
 804842c: /home/drepper/gnu/new-bu/build/ttt/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no
index a8a175935eeb2ccba88ba85aac3b62daba644650..912793e4ae8738e1e727fe355d1ae2c02799392b 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./get-pubnames testfile testfile2 <<\EOF
+testrun_compare ${abs_builddir}/get-pubnames testfile testfile2 <<\EOF
  [ 0] "main", die: 104, cu: 11
 CU name: "m.c"
 object name: "main"
index 768cf6962100dae8ee42a7411cd991026c1a565a..3b6c4457f1d79d94d4d90505dc265b499d5d0629 100755 (executable)
 
 testfiles testfile testfile2 testfile8 testfile14 testfile23
 
-testrun_compare ./line2addr -e testfile f.c:4 testfile f.c:8 <<\EOF
+testrun_compare ${abs_builddir}/line2addr -e testfile f.c:4 testfile f.c:8 <<\EOF
 f.c:4 -> 0x804846b (/home/drepper/gnu/new-bu/build/ttt/f.c:4)
 EOF
 
-testrun_compare ./line2addr -e testfile2 m.c:6 b.c:1 <<\EOF
+testrun_compare ${abs_builddir}/line2addr -e testfile2 m.c:6 b.c:1 <<\EOF
 m.c:6 -> 0x100004cc (/shoggoth/drepper/m.c:6)
 b.c:1 -> 0x10000470 (/shoggoth/drepper/b.c:4)
 EOF
 
-testrun_compare ./line2addr -e testfile8 strip.c:953 strip.c:365 <<\EOF
+testrun_compare ${abs_builddir}/line2addr -e testfile8 strip.c:953 strip.c:365 <<\EOF
 strip.c:953 -> (.text)+0x169f (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953)
 strip.c:953 -> (.text)+0x16aa (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953)
 strip.c:365 -> (.text)+0x278b (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365)
 strip.c:365 -> (.text)+0x2797 (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365)
 EOF
 
-testrun_compare ./line2addr -e testfile14 v.c:6 <<\EOF
+testrun_compare ${abs_builddir}/line2addr -e testfile14 v.c:6 <<\EOF
 v.c:6 -> 0x400468 (/home/drepper/local/elfutils-build/20050425/v.c:6)
 v.c:6 -> 0x400487 (/home/drepper/local/elfutils-build/20050425/v.c:6)
 EOF
 
-testrun_compare ./line2addr -e testfile23 foo.c:2 foo.c:6 <<\EOF
+testrun_compare ${abs_builddir}/line2addr -e testfile23 foo.c:2 foo.c:6 <<\EOF
 foo.c:2 -> (.init.text)+0xc (/home/roland/stock-elfutils-build/foo.c:2)
 foo.c:6 -> (.text)+0xc (/home/roland/stock-elfutils-build/foo.c:6)
 EOF
index eb6f8cf04cf68ffffd4d4cb5a4805125b8eab7ff..ab5f2c37945d8f0db8037666783d5e1254408a8b 100755 (executable)
 # gcc -g -o main main.c
 testfiles testfile_low_high_pc
 
-testrun ./low_high_pc -e ./testfile_low_high_pc
-testrun ./low_high_pc -e ./low_high_pc
-testrun ./low_high_pc -e ../src/strip
-testrun ./low_high_pc -e ../src/strip.o
-testrun ./low_high_pc -e ../libelf/libelf.so
+testrun ${abs_builddir}/low_high_pc -e ./testfile_low_high_pc
+testrun ${abs_builddir}/low_high_pc -e ${abs_builddir}/low_high_pc
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip.o
+testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/libelf/libelf.so
 
 exit 0
index 70a16edfe2b1a610592eac16d4ccf750cb1f13bf..c160968b305edd46f2343ba91844693ba3b0aab7 100755 (executable)
@@ -34,14 +34,14 @@ testfiles testfile-macinfo testfile-macros
 
 status=0
 
-testrun ../src/readelf --debug-dump=info testfile-macinfo \
+testrun ${abs_top_builddir}/src/readelf --debug-dump=info testfile-macinfo \
        | grep macro_info > readelf.macros.out ||
   { echo "*** failure readelf --debug-dump=info testfile-macinfo"; status=1; }
 testrun_compare cat readelf.macros.out <<\EOF
            macro_info           (sec_offset) 0
 EOF
 
-testrun ../src/readelf --debug-dump=info testfile-macros \
+testrun ${abs_top_builddir}/src/readelf --debug-dump=info testfile-macros \
        | grep GNU_macros > readelf.macros.out ||
   { echo "*** failure readelf --debug-dump=info testfile-macros"; status=1; }
 testrun_compare cat readelf.macros.out <<\EOF
index ed7672fe9db3f442478c69b846edbb60d7250566..b543922c3e7786265d67e7fb027a999349f18468 100755 (executable)
@@ -70,8 +70,8 @@ native_test()
   test $native -eq 0 || testrun "$@" -p $native > /dev/null
 }
 
-native_test ./allregs
-native_test ./funcretval
+native_test ${abs_builddir}/allregs
+native_test ${abs_builddir}/funcretval
 
 # We do this explicitly rather than letting the trap 0 cover it,
 # because as of version 3.1 bash prints the "Killed" report for
index 0fe0ec622016908d662e8dfc97d78a84f9c81c75..d2c124657a7acebf4c904cb2410f0ad6fccd0817 100755 (executable)
@@ -20,7 +20,7 @@
 for what_arg in --debug-syms --defined-only --dynamic --extern-only; do
   for format_arg in --format=bsd --format=sysv --format=posix; do
     for out_arg in --numeric-sort --no-sort --reverse-sort; do
-      testrun_on_self_quiet ../src/nm $what_arg $format_arg $out_arg
+      testrun_on_self_quiet ${abs_top_builddir}/src/nm $what_arg $format_arg $out_arg
     done
   done
 done
index 588261f9fb06c1452ca775189e59f6de7c6fc9ee..3398c0d1321042052c94fa433049cfa2caac1380 100755 (executable)
@@ -47,7 +47,7 @@ EOF
 # Prior to commit 1743d7f, libdwfl would fail on the second address,
 # because it didn't notice that prelink added a 0x20-byte offset from
 # what the .debug file reports.
-testrun_compare ../src/addr2line -S -M testmaps52-32 \
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps52-32 \
     0x11140c 0x4100042d 0x4200040e <<\EOF
 foo
 /home/jistone/src/elfutils/tests/testfile52-32.c:2
@@ -76,7 +76,7 @@ cat > testmaps52-64 <<EOF
 3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so
 EOF
 
-testrun_compare ../src/addr2line -S -M testmaps52-64 \
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps52-64 \
     0x100000056c 0x300000056d 0x380000056e <<\EOF
 foo
 /home/jistone/src/elfutils/tests/testfile52-64.c:2
@@ -97,7 +97,7 @@ EOF
 # prelink -N testfile53-32.prelink
 testfiles testfile53-32 testfile53-32.debug testfile53-32.prelink
 
-testrun_compare ../src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF
 main
 /home/jistone/src/elfutils/tests/testfile53-32.c:2
 main+0x1
@@ -105,7 +105,7 @@ main+0x1
 EOF
 
 # prelink shuffled some of the sections, but .text is in the same place.
-testrun_compare ../src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF
 main+0x2
 /home/jistone/src/elfutils/tests/testfile53-32.c:2
 main+0x3
@@ -116,14 +116,14 @@ EOF
 # prelink section shuffling.
 testfiles testfile53-64 testfile53-64.debug testfile53-64.prelink
 
-testrun_compare ../src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF
 main
 /home/jistone/src/elfutils/tests/testfile53-64.c:2
 main+0x1
 /home/jistone/src/elfutils/tests/testfile53-64.c:2
 EOF
 
-testrun_compare ../src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF
 main+0x2
 /home/jistone/src/elfutils/tests/testfile53-64.c:2
 main+0x3
@@ -159,7 +159,7 @@ cat > testmaps54-32 <<EOF
 42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so
 EOF
 
-testrun_compare ../src/addr2line -S -M testmaps54-32 \
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps54-32 \
     0x1111fc 0x1122a4 0x410001fd 0x410012a5 0x420001fe <<\EOF
 foo
 ??:0
@@ -193,7 +193,7 @@ cat > testmaps54-64 <<EOF
 3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so
 EOF
 
-testrun_compare ../src/addr2line -S -M testmaps54-64 \
+testrun_compare ${abs_top_builddir}/src/addr2line -S -M testmaps54-64 \
     0x10000002f8 0x1000200448 0x30000002f9 0x3000200449 0x38000002fa <<\EOF
 foo
 ??:0
@@ -218,7 +218,7 @@ EOF
 # prelink -N testfile55-32.prelink
 testfiles testfile55-32 testfile55-32.debug testfile55-32.prelink
 
-testrun_compare ../src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF
 main
 /home/jistone/src/elfutils/tests/testfile55-32.c:2
 main+0x1
@@ -227,7 +227,7 @@ EOF
 
 # prelink splits .bss into .dynbss+.bss, so the start of .bss changes, but the
 # total size remains the same, and .text doesn't move at all.
-testrun_compare ../src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF
 main+0x2
 /home/jistone/src/elfutils/tests/testfile55-32.c:2
 main+0x3
@@ -237,14 +237,14 @@ EOF
 # Repeat testfile55 in 64-bit
 testfiles testfile55-64 testfile55-64.debug testfile55-64.prelink
 
-testrun_compare ../src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF
 main
 /home/jistone/src/elfutils/tests/testfile55-64.c:2
 main+0x1
 /home/jistone/src/elfutils/tests/testfile55-64.c:2
 EOF
 
-testrun_compare ../src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF
+testrun_compare ${abs_top_builddir}/src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF
 main+0x2
 /home/jistone/src/elfutils/tests/testfile55-64.c:2
 main+0x3
index ce109cf551597da4c61c81d57dba91f96c8e9bbd..0b34cbbb40c688969562512d7c1e885256e3cb7b 100755 (executable)
@@ -30,7 +30,7 @@ EOF
 
 cp ranlib-test.a ranlib-test.a-copy
 
-testrun ../src/ranlib ranlib-test.a
+testrun ${abs_top_builddir}/src/ranlib ranlib-test.a
 
 # The ranlib call should not have changed anything.
 cmp ranlib-test.a ranlib-test.a-copy
index 75d00b366073bc7d15b615aeb995438c1f74adbb..dbc57ecbb8b588072016c7883bc59321786897a5 100755 (executable)
@@ -23,7 +23,7 @@ indexed=${indexed:-testfile19.index}
 
 testfiles $original $indexed
 
-testrun ../src/ranlib $original
+testrun ${abs_top_builddir}/src/ranlib $original
 
 if test -z "$noindex"; then
   # The date in the index is different.  The reference file has it blanked
index a610fca0103b59685328d54ec659f8e38cf5f38d..3fc3c546f5ecd1fc60785da6157e0a7f071bf93f 100755 (executable)
 
 testfiles testfilefoobarbaz
 
-testrun_compare ../src/readelf --debug-dump=aranges testfilefoobarbaz <<EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=aranges testfilefoobarbaz <<EOF
 
 DWARF section [27] '.debug_aranges' at offset 0x1044:
 
@@ -148,7 +148,7 @@ Table at offset 72:
    0x08048340 <nobaz>..0x0804834a <nobaz+0xa>
 EOF
 
-testrun_compare ../src/readelf --debug-dump=decodedaranges testfilefoobarbaz <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedaranges testfilefoobarbaz <<\EOF
 
 DWARF section [27] '.debug_aranges' at offset 0x1044 contains 5 entries:
  [0] start: 0x080482f0, length:    52, CU DIE offset:     11
index 3e4b7bf2e3a687db7275b4fdac37c4c7bdd1e294..d0b6ed2468145a9d76398c648bf5811cf214a06c 100755 (executable)
@@ -32,7 +32,7 @@
 
 testfiles testlib_dynseg.so
 
-testrun_compare ../src/readelf -d testlib_dynseg.so <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -d testlib_dynseg.so <<\EOF
 
 Dynamic segment contains 28 entries:
  Addr: 0x00000000000017e0  Offset: 0x0007e0  Link to section: [ 3] '.dynstr'
index ca939f30a8c1a2a38e31ed9f813ca455108ba238..44d24758d1aac5932daed2a49b97db1082b297f0 100755 (executable)
@@ -78,7 +78,7 @@
 testfiles libtestfile_multi_shared.so testfile_multi_main testfile_multi.dwz
 testfiles testfile-dwzstr testfile-dwzstr.multi
 
-testrun_compare ../src/readelf --debug-dump=info testfile_multi_main <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile_multi_main <<\EOF
 
 DWARF section [28] '.debug_info' at offset 0x1078:
  [Offset]
@@ -136,7 +136,7 @@ DWARF section [28] '.debug_info' at offset 0x1078:
              type                 (ref_udata) [    2b]
 EOF
 
-testrun_compare ../src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
 
 DWARF section [25] '.debug_info' at offset 0x106c:
  [Offset]
@@ -173,7 +173,7 @@ DWARF section [25] '.debug_info' at offset 0x106c:
                 [   0] fbreg -24
 EOF
 
-testrun_compare ../src/readelf --debug-dump=info testfile-dwzstr <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=info testfile-dwzstr <<\EOF
 
 DWARF section [28] '.debug_info' at offset 0x1088:
  [Offset]
index 31c94c14fb70dd6bc68ecc0610e906b579fd6dc6..fcbc3c571d537585249935f56ffb658774525ad5 100755 (executable)
@@ -65,7 +65,7 @@
 
 testfiles testfilegdbindex5 testfilegdbindex7
 
-testrun_compare ../src/readelf --debug-dump=gdb_index testfilegdbindex5 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=gdb_index testfilegdbindex5 <<\EOF
 
 GDB section [33] '.gdb_index' at offset 0xe76 contains 8383 bytes :
  Version:         5
@@ -96,7 +96,7 @@ GDB section [33] '.gdb_index' at offset 0xe76 contains 8383 bytes :
  [ 754] symbol: int, CUs: 0
 EOF
 
-testrun_compare ../src/readelf --debug-dump=gdb_index testfilegdbindex7 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=gdb_index testfilegdbindex7 <<\EOF
 
 GDB section [33] '.gdb_index' at offset 0xe76 contains 8399 bytes :
  Version:         7
index f0e491d691d370b030329aac91750a1adfda357e..32bcf9d5f399d4913c9e0814a2853a1d44b06a81 100755 (executable)
@@ -22,7 +22,7 @@
 
 testfiles testfilefoobarbaz
 
-testrun_compare ../src/readelf --debug-dump=line testfilefoobarbaz <<EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=line testfilefoobarbaz <<EOF
 
 DWARF section [30] '.debug_line' at offset 0x15f6:
 
@@ -197,7 +197,7 @@ Line number statements:
  [   10e] extended opcode 1:  end of sequence
 EOF
 
-testrun_compare ../src/readelf --debug-dump=decodedline testfilefoobarbaz <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=decodedline testfilefoobarbaz <<\EOF
 
 DWARF section [30] '.debug_line' at offset 0x15f6:
 
index 6612e7dfcb69dc5fd3ee1e05f09ef9433f24c996..98870fcf73430aa7490efe51d6b48a0bf6d66815 100755 (executable)
@@ -59,7 +59,7 @@
 testfiles testfileloc
 
 # Process values as offsets from base addresses and resolve to symbols.
-testrun_compare ../src/readelf --debug-dump=loc --debug-dump=ranges \
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=loc --debug-dump=ranges \
   testfileloc<<\EOF
 
 DWARF section [33] '.debug_loc' at offset 0xd2a:
@@ -75,7 +75,7 @@ DWARF section [34] '.debug_ranges' at offset 0xd94:
 EOF
 
 # Don't resolve addresses to symbols.
-testrun_compare ../src/readelf -N --debug-dump=loc --debug-dump=ranges \
+testrun_compare ${abs_top_builddir}/src/readelf -N --debug-dump=loc --debug-dump=ranges \
   testfileloc<<\EOF
 
 DWARF section [33] '.debug_loc' at offset 0xd2a:
@@ -91,7 +91,7 @@ DWARF section [34] '.debug_ranges' at offset 0xd94:
 EOF
 
 # Produce "raw" unprocessed content.
-testrun_compare ../src/readelf -U --debug-dump=loc --debug-dump=ranges \
+testrun_compare ${abs_top_builddir}/src/readelf -U --debug-dump=loc --debug-dump=ranges \
   testfileloc<<\EOF
 
 DWARF section [33] '.debug_loc' at offset 0xd2a:
index c65992bd2263b1c15bc688783a9c5b567e41b22f..8693203346e1de88e95f17a2cca25fc44ddee377 100755 (executable)
@@ -59,7 +59,7 @@
 
 testfiles testfilemacro
 
-testrun_compare ../src/readelf --debug-dump=macro testfilemacro <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --debug-dump=macro testfilemacro <<\EOF
 
 DWARF section [32] '.debug_macro' at offset 0x2480:
 
index 3c4ec514db6d8ced6322e5fbdb76a9aaf9fd0687..915bdebdb94c89c609a1442080809b14baf07356 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile63
 
-testrun_compare ../src/readelf -n testfile63 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile63 <<\EOF
 
 Note segment of 892 bytes at offset 0x274:
   Owner          Data size  Type
@@ -85,7 +85,7 @@ Note segment of 892 bytes at offset 0x274:
 EOF
 
 testfiles testfile67
-testrun_compare ../src/readelf -n testfile67 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile67 <<\EOF
 
 Note segment of 1044 bytes at offset 0xe8:
   Owner          Data size  Type
@@ -150,7 +150,7 @@ Note segment of 1044 bytes at offset 0xe8:
 EOF
 
 testfiles testfile68
-testrun_compare ../src/readelf -n testfile68 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile68 <<\EOF
 
 Note segment of 852 bytes at offset 0x94:
   Owner          Data size  Type
index bad31cf239594c6d8e8905f51ee888b9e9f94d85..4373b5f000a7537284327426ed2dd92da42a6477 100755 (executable)
@@ -251,33 +251,33 @@ Symbol table [27] '.symtab' contains 35 entries:
 EOF
 
 cat testfile.dynsym.in testfile.symtab.in \
-  | testrun_compare ../src/readelf -s testfilebaztab
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebaztab
 
 cat testfile.dynsym.in \
-  | testrun_compare ../src/readelf -s testfilebazdbg
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdbg
 
 cat testfile.symtab.in \
-  | testrun_compare ../src/readelf -s testfilebazdbg.debug
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdbg.debug
 
 cat testfile.dynsym.in \
-  | testrun_compare ../src/readelf -s testfilebazdyn
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazdyn
 
 cat testfile.dynsym.in \
-  | testrun_compare ../src/readelf -s testfilebazmdb
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazmdb
 
 cat testfile.minsym.in \
-  | testrun_compare ../src/readelf --elf-section -s testfilebazmdb
+  | testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebazmdb
 
 cat testfile.dynsym.in \
-  | testrun_compare ../src/readelf -s testfilebazmin
+  | testrun_compare ${abs_top_builddir}/src/readelf -s testfilebazmin
 
 cat testfile.minsym.in \
-  | testrun_compare ../src/readelf --elf-section -s testfilebazmin
+  | testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebazmin
 
-testrun_compare ../src/readelf -s testfilebasmin <<EOF
+testrun_compare ${abs_top_builddir}/src/readelf -s testfilebasmin <<EOF
 EOF
 
-testrun_compare ../src/readelf --elf-section -s testfilebasmin <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf --elf-section -s testfilebasmin <<\EOF
 
 Symbol table [ 6] '.symtab' contains 9 entries:
  6 local symbols  String table: [ 7] '.strtab'
index 4602712c5168f91ecc807a0ff46d2d3798b79bd4..7ffb357798a7661f964eb806be0fb0e3aa94fcec 100755 (executable)
@@ -18,4 +18,4 @@
 . $srcdir/test-subr.sh
 
 # Just makes sure readelf doesn't crash
-testrun_on_self_quiet ../src/readelf -a -w
+testrun_on_self_quiet ${abs_top_builddir}/src/readelf -a -w
index b64103e58fab3fe61870ccdcd3ab41887558c90d..4725049de2e02dda2f6cb9b00c0ebc8cd90767c8 100755 (executable)
@@ -26,7 +26,7 @@ testfiles testfile3
 
 tempfiles testfile.temp
 
-testrun ../src/readelf -r testfile3 > testfile.temp
+testrun ${abs_top_builddir}/src/readelf -r testfile3 > testfile.temp
 
 diff -u - testfile.temp <<EOF
 
index 676fcded8c58fd36c2eeff8506d0016b6aa646da..903062473adf9c3d440e15e2d9ad97146ee93131 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile28
 
-testrun_compare ../src/readelf -x .strtab testfile28 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -x .strtab testfile28 <<\EOF
 
 Hex dump of section [6] '.strtab', 1 bytes at offset 0x290:
   0x00000000 00                                  .
index 15f0ba5f44851d13122774714d4ab30d34ec8a7d..cc0a191dc6ab562e7ab7554d5c8082f0226c36d6 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile40.debug
 
-testrun_compare ../src/readelf -n testfile40.debug <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile40.debug <<\EOF
 
 Note section [ 6] '.note' of 60 bytes at offset 0x120:
   Owner          Data size  Type
index 16cf80239b432d2ec4e0efde4d156b62103114fc..ca0526a0d843f6b4149426bd8f1bb5b2b8ce4f9d 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile19.index
 
-testrun_compare ../src/readelf -c testfile19.index <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -c testfile19.index <<\EOF
 
 Index of archive 'testfile19.index' has 4 entries:
 Archive member 'u1.o' contains:
index d12f57f965a6e25614a55a66ff6f7d314eae0903..46eec7b504ccdcbf7ce06a1dde52da1e663b0970 100755 (executable)
@@ -19,6 +19,6 @@
 
 testfiles testfile14
 
-testrun >/dev/null ../src/readelf -w testfile14 testfile14
+testrun >/dev/null ${abs_top_builddir}/src/readelf -w testfile14 testfile14
 
 exit 0
index da361c85a940e6a5ad1da0e51c27fba5f77e4347..b1732fc6591a570e111a97f90b1eb20fe50a6996 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile62
 
-testrun_compare ../src/readelf -n testfile62 <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -n testfile62 <<\EOF
 
 Note segment of 2104 bytes at offset 0x158:
   Owner          Data size  Type
index 3a4cb1cb13521badf1555a5820a0b79aa47818a2..f4372847db6cb5df013dee3eae6e11a17ce94e25 100755 (executable)
@@ -19,7 +19,7 @@
 
 testfiles testfile56 testfile57
 
-testrun ./rerequest_tag testfile56
-testrun ./rerequest_tag testfile57
+testrun ${abs_builddir}/rerequest_tag testfile56
+testrun ${abs_builddir}/rerequest_tag testfile57
 
 exit 0
index 351730f68d48b73978ee6ebbf2d10669d5f05d6c..40d0e362211284c55f375ebfeec9c4976416f982 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile testfile2
 
-testrun_compare ./show-abbrev testfile testfile2 <<\EOF
+testrun_compare ${abs_builddir}/show-abbrev testfile testfile2 <<\EOF
 abbrev[0]: code = 1, tag = 17, children = 1
 abbrev[0]: attr[0]: code = 16, form = 6, offset = 0
 abbrev[0]: attr[1]: code = 18, form = 1, offset = 2
index cbe60f93140660be3dbd8c28b56f61a449eafce7..f92ee48891763a67bac1ff55cc571b7669df1892 100755 (executable)
@@ -20,7 +20,7 @@
 
 testfiles testfile5 testfile2
 
-testrun_compare ./show-die-info testfile5 testfile2 <<\EOF
+testrun_compare ${abs_builddir}/show-die-info testfile5 testfile2 <<\EOF
 file: testfile5
 New CU: off = 0, hsize = 11, ab = 0, as = 4, os = 4
      DW_TAG_compile_unit
index 6bfc87e1560294f28116e013570d217c682f344e..33f2d641f1774313b6dfb7576ba9beecba57e619 100755 (executable)
@@ -21,7 +21,7 @@
 files="testfile `seq 2 9 | while read n; do echo testfile$n; done`"
 testfiles $files
 
-testrun_compare ../src/strings -tx -f $files <<\EOF
+testrun_compare ${abs_top_builddir}/src/strings -tx -f $files <<\EOF
 testfile:      f4 /lib/ld-linux.so.2
 testfile:     1c9 __gmon_start__
 testfile:     1d8 libc.so.6
index 86d1d441bde73fa3d60d647cedf1da76aa95b60e..1c836a4a012fcc3a3a3fcba3f21a29bb38edf142 100755 (executable)
@@ -49,7 +49,7 @@ dbgfile=$infile.debug
 testfiles $infile
 tempfiles $outfile $dbgfile
 
-testrun ../src/strip -o $outfile -f $dbgfile $infile
-testrun ../src/elflint -q $infile
-testrun ../src/elflint -q $outfile
-testrun ../src/elflint -q -d $dbgfile
+testrun ${abs_top_builddir}/src/strip -o $outfile -f $dbgfile $infile
+testrun ${abs_top_builddir}/src/elflint -q $infile
+testrun ${abs_top_builddir}/src/elflint -q $outfile
+testrun ${abs_top_builddir}/src/elflint -q -d $dbgfile
index 603fb7c70d3a3812b73b9f843afe0818da903b97..ec4be3fff6f9ee8cc5a40266b9569323c4898751 100755 (executable)
@@ -28,18 +28,18 @@ runtest() {
   outfile2=out.stripped2
   debugfile2=out.debug2
 
-  testrun ../src/strip -o $outfile1 -f $debugfile1 $infile ||
+  testrun ${abs_top_builddir}/src/strip -o $outfile1 -f $debugfile1 $infile ||
   { echo "*** failure strip $infile"; status=1; }
 
-  testrun ../src/strip --reloc-debug-sections -o $outfile2 \
+  testrun ${abs_top_builddir}/src/strip --reloc-debug-sections -o $outfile2 \
        -f $debugfile2 $infile ||
   { echo "*** failure strip --reloc-debug-sections $infile"; status=1; }
 
   # shouldn't make any difference for stripped files.
-  testrun ../src/readelf -a $outfile1 > readelf.out ||
+  testrun ${abs_top_builddir}/src/readelf -a $outfile1 > readelf.out ||
   { echo "*** failure readelf -a outfile1 $infile"; status=1; }
 
-  testrun_compare ../src/readelf -a $outfile2 < readelf.out ||
+  testrun_compare ${abs_top_builddir}/src/readelf -a $outfile2 < readelf.out ||
   { echo "*** failure compare stripped files $infile"; status=1; }
 
   # debug files however should be smaller, when ET_REL.
@@ -51,11 +51,11 @@ runtest() {
 
   # Strip of DWARF section lines, offset will not match.
   # Everything else should match.
-  testrun ../src/readelf -w $debugfile1 \
+  testrun ${abs_top_builddir}/src/readelf -w $debugfile1 \
        | grep -v ^DWARF\ section > readelf.out1 ||
   { echo "*** failure readelf -w debugfile1 $infile"; status=1; }
 
-  testrun ../src/readelf -w $debugfile2 \
+  testrun ${abs_top_builddir}/src/readelf -w $debugfile2 \
        | grep -v ^DWARF\ section > readelf.out2 ||
   { echo "*** failure readelf -w debugfile2 $infile"; status=1; }
 
@@ -101,7 +101,7 @@ runtest hello_ppc64.ko 1
 runtest hello_s390.ko 1
 
 # self test, shouldn't impact non-ET_REL files at all.
-runtest ../src/strip 0
-runtest ../src/strip.o 1
+runtest ${abs_top_builddir}/src/strip 0
+runtest ${abs_top_builddir}/src/strip.o 1
 
 exit $status
index c6c7c0946529f472f7113593816084d1bb971626..c558e90b5911b6d188364fc50c428aac31c6ea14 100755 (executable)
@@ -27,30 +27,30 @@ test x$stripped = xtestfile.temp || testfiles $stripped $debugfile
 
 tempfiles testfile.temp testfile.debug.temp testfile.unstrip
 
-testrun ../src/strip -o testfile.temp $debugout $original
+testrun ${abs_top_builddir}/src/strip -o testfile.temp $debugout $original
 
 status=0
 
 cmp $stripped testfile.temp || status=$?
 
 # Check elflint and the expected result.
-testrun ../src/elflint -q testfile.temp || status=$?
+testrun ${abs_top_builddir}/src/elflint -q testfile.temp || status=$?
 
 test -z "$debugfile" || {
 cmp $debugfile testfile.debug.temp || status=$?
 
 # Check elflint and the expected result.
-testrun ../src/elflint -q -d testfile.debug.temp || status=$?
+testrun ${abs_top_builddir}/src/elflint -q -d testfile.debug.temp || status=$?
 
 # Now test unstrip recombining those files.
-testrun ../src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
+testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
 
 # Check that it came back whole.
-testrun ../src/elfcmp --hash-inexact $original testfile.unstrip
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip
 }
 
 tempfiles testfile.sections
-testrun ../src/readelf -S testfile.temp > testfile.sections || status=$?
+testrun ${abs_top_builddir}/src/readelf -S testfile.temp > testfile.sections || status=$?
 fgrep ' .debug_' testfile.sections && status=1
 
 exit $status
index 26552ac95955cbcf5e016d45c152f1d5fda36ac1..43df16e4490299b1446fa0ac0adb0c10702eb53f 100755 (executable)
@@ -26,7 +26,7 @@
 #  ar cru testarchive64.a aaa.o bbb.o ccc.o
 testfiles testarchive64.a
 
-testrun_compare ../src/readelf -c testarchive64.a <<\EOF
+testrun_compare ${abs_top_builddir}/src/readelf -c testarchive64.a <<\EOF
 
 Index of archive 'testarchive64.a' has 7 entries:
 Archive member 'aaa.o' contains:
index 15667565c5d540c0687ebce70ec6ffec8b9ac10b..9bedf17493770082ec5e0cf938142e242ea7183f 100755 (executable)
@@ -19,4 +19,4 @@
 
 testfiles testfile
 
-testrun ./test-flag-nobits testfile
+testrun ${abs_builddir}/test-flag-nobits testfile
index 3a453ab4d1502482225163038acbc581f4832575..b85839ce7af9ef6673b1ba5b47ea3f2760e8a665 100755 (executable)
@@ -43,7 +43,7 @@
 
 testfiles testfile59
 
-testrun_compare ./typeiter testfile59 <<\EOF
+testrun_compare ${abs_builddir}/typeiter testfile59 <<\EOF
 ok
 EOF
 
index 1353b1ddb71969f128236ab9129f674ed9e55498..9c2b43b3c805bdbc32cd731b1d543df15e5f809b 100755 (executable)
@@ -33,7 +33,7 @@
 
 testfiles testcore-rtlib testcore-rtlib-ppc
 
-testrun_compare ../src/unstrip -n --core=testcore-rtlib <<\EOF
+testrun_compare ${abs_top_builddir}/src/unstrip -n --core=testcore-rtlib <<\EOF
 0x8048000+0x2000 f1c600bc36cb91bf01f9a63a634ecb79aa4c3199@0x8048178 . - [exe]
 0xf77d6000+0x1000 676560b1b765cde9c2e53f134f4ee354ea894747@0xf77d6210 . - linux-gate.so.1
 0xf77b3000+0x9000 c6c5b5e35ab9589d4762ac85b4bd56b1b2720e37@0xf77b3164 /lib/librt.so.1 - librt.so.1
@@ -42,7 +42,7 @@ testrun_compare ../src/unstrip -n --core=testcore-rtlib <<\EOF
 0xf77d7000+0x21000 6d2cb32650054f1c176d01d48713a4a5e5e84c1a@0xf77d7124 /lib/ld-linux.so.2 - ld-linux.so.2
 EOF
 
-testrun_compare ../src/unstrip -n --core=testcore-rtlib-ppc <<\EOF
+testrun_compare ${abs_top_builddir}/src/unstrip -n --core=testcore-rtlib-ppc <<\EOF
 0x10000000+0x20000 979b7a26747cc09bd84a42b311b5288c704baea5@0x10000174 . - [exe]
 0x100000+0x10000 708b900b05176964512a6b0fe90c2a0c9d73d726@0x100334 . - linux-vdso32.so.1
 0xfd50000+0x30000 3f7d21508470322d2f47acddc20ab10516edba99@0xfd50164 /lib/librt.so.1 - librt.so.1
index 36549430b59d78b2072e32e6e5298316eacc924d..dc7d3a423de2dcdb63786bda070971da0f68d0de 100755 (executable)
@@ -29,15 +29,15 @@ tempfiles testfile.unstrip testfile.inplace
 # stripped sections that shrank in the stripped file.  strip
 # no longer does that, but unstrip must still handle it.
 
-testrun ../src/unstrip -o testfile.unstrip $stripped $debugfile
+testrun ${abs_top_builddir}/src/unstrip -o testfile.unstrip $stripped $debugfile
 
-testrun ../src/elfcmp --hash-inexact $original testfile.unstrip
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.unstrip
 
 # Also test modifying the file in place.
 
 rm -f testfile.inplace
 cp $debugfile testfile.inplace
 chmod 644 testfile.inplace
-testrun ../src/unstrip $stripped testfile.inplace
+testrun ${abs_top_builddir}/src/unstrip $stripped testfile.inplace
 
-testrun ../src/elfcmp --hash-inexact $original testfile.inplace
+testrun ${abs_top_builddir}/src/elfcmp --hash-inexact $original testfile.inplace
index 19a9836a0f575c09c515e3c0222458f96ba19061..7bf1f71d3a4b060ed8973a43e0af680c6a0b084f 100644 (file)
 
 set -e
 
+# Each test runs in its own directory to make sure they can run in parallel.
+test_dir="test-$$"
+mkdir -p "$test_dir"
+pushd "$test_dir" > /dev/null
+
 #LC_ALL=C
 #export LC_ALL
 
 remove_files=
-trap 'rm -f $remove_files' 0
+trap 'rm -f $remove_files; popd > /dev/null; rmdir $test_dir' 0
 
 tempfiles()
 {
@@ -36,7 +41,7 @@ tempfiles()
 testfiles()
 {
   for file; do
-    bunzip2 -c $srcdir/${file}.bz2 > ${file} 2>/dev/null || exit 77
+    bunzip2 -c ${abs_srcdir}/${file}.bz2 > ${file} 2>/dev/null || exit 77
     remove_files="$remove_files $file"
   done
 }
@@ -80,13 +85,13 @@ installed_testrun()
   program="$1"
   shift
   case "$program" in
-  ./*)
+  ${abs_builddir}/*)
     if [ "x$elfutils_tests_rpath" != xno ]; then
       echo >&2 installcheck not possible with --enable-tests-rpath
       exit 77
     fi
     ;;
-  ../*)
+  ${abs_top_builddir}/src/*)
     program=${bindir}/`program_transform ${program##*/}`
     ;;
   esac
@@ -104,10 +109,12 @@ program_transform()
   echo "$*" | sed "${program_transform_name}"
 }
 
-self_test_files=`echo ../src/addr2line ../src/elfcmp ../src/elflint \
-../src/findtextrel ../src/ld ../src/nm ../src/objdump ../src/readelf \
-../src/size ../src/strip ../libelf/libelf.so ../libdw/libdw.so \
-../libasm/libasm.so ../backends/libebl_*.so`
+self_test_files=`echo ${abs_top_builddir}/src/addr2line \
+${abs_top_builddir}/src/elfcmp ${abs_top_builddir}/src/elflint \
+${abs_top_builddir}/src/nm ${abs_top_builddir}/src/objdump \
+${abs_top_builddir}/src/readelf ${abs_top_builddir}/src/size \
+${abs_top_builddir}/src/strip ${abs_top_builddir}/libelf/libelf.so \
+${abs_top_builddir}/libdw/libdw.so ${abs_top_builddir}/backends/libebl_*.so`
 
 # Provide a command to run on all self-test files with testrun.
 testrun_on_self()