diff options
author | Tom Tromey <tromey@redhat.com> | 2013-10-18 13:12:32 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-11-04 11:02:10 -0700 |
commit | 24890efdabbd9d827cdd2088b022f070da04b14f (patch) | |
tree | 635a4429eb8a0336102d135568f8209cb37cad49 | |
parent | c59ffcabfe8b416384b9ec8288b77ae44643be4d (diff) | |
download | gdb-24890efdabbd9d827cdd2088b022f070da04b14f.zip gdb-24890efdabbd9d827cdd2088b022f070da04b14f.tar.gz gdb-24890efdabbd9d827cdd2088b022f070da04b14f.tar.bz2 |
fix argv0-symlink.exp for parallel mode
argv0-symlink.exp doesn't work properly if standard_output_file puts
files into a per-test subdirectory. That's because it assumes that
files appear in $subdir, which is no longer true.
This patch fixes the problem by computing the correct directory at
runtime.
Tested both with and without GDB_PARALLEL on x86-64 Fedora 18.
2013-11-04 Tom Tromey <tromey@redhat.com>
* gdb.base/argv0-symlink.exp: Compute executable's directory
dynamically.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/argv0-symlink.exp | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index d058ed0..f60e657 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2013-11-04 Tom Tromey <tromey@redhat.com> + * gdb.base/argv0-symlink.exp: Compute executable's directory + dynamically. + +2013-11-04 Tom Tromey <tromey@redhat.com> + * gdb.asm/asm-source.exp: Use standard_output_file. 2013-11-04 Tom Tromey <tromey@redhat.com> diff --git a/gdb/testsuite/gdb.base/argv0-symlink.exp b/gdb/testsuite/gdb.base/argv0-symlink.exp index cf5785c..e4efe19 100644 --- a/gdb/testsuite/gdb.base/argv0-symlink.exp +++ b/gdb/testsuite/gdb.base/argv0-symlink.exp @@ -37,7 +37,14 @@ if ![runto_main] { } gdb_test {print argv[0]} "/$filelink\"" $test -gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" + +# For a link named /PATH/TO/DIR/LINK, we want to check the output +# against "/DIR/LINK", but computed in a way that doesn't make +# assumptions about the test directory layout. +set full_filelink [standard_output_file $filelink] +set lastdir [file tail [file dirname $full_filelink]] + +gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" set test "kept directory symbolic link name" @@ -65,4 +72,4 @@ if ![is_remote target] { setup_kfail "*-*-*" gdb/15934 } gdb_test {print argv[0]} "/$dirlink/$filelink\"" $test -gdb_test "info inferiors" "/$subdir/$filelink *" "$test for info inferiors" +gdb_test "info inferiors" "/$lastdir/$filelink *" "$test for info inferiors" |