diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-23 12:18:01 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-11-04 11:02:07 -0700 |
commit | 08b3fe691141c34a81531906ef9865fe8d25724c (patch) | |
tree | 255570da80ace50f54a64c63f6d963ed8ad11ac3 /gdb/testsuite/gdb.base/sepdebug.exp | |
parent | 32cfb09dfc283da30663f07b0e71726bcb3e093a (diff) | |
download | gdb-08b3fe691141c34a81531906ef9865fe8d25724c.zip gdb-08b3fe691141c34a81531906ef9865fe8d25724c.tar.gz gdb-08b3fe691141c34a81531906ef9865fe8d25724c.tar.bz2 |
simple changes in gdb.base
This makes more changes in gdb.base to make it parallel-safe. I think
the changes in this particular patch are relatively straightforward,
so I've grouped them all together.
2013-11-04 Tom Tromey <tromey@redhat.com>
* gdb.base/advance.exp: Use standard_testfile and
prepare_for_testing.
* gdb.base/bigcore.exp: Use standard_output_file. "cd" to
appropriate directory when local.
* gdb.base/dump.exp: Use standard_output_file. Update all
"dump" and "restore" filenames.
* gdb.base/interact.exp: Use standard_output_file.
* gdb.base/jit-so.exp: Don't download file when local.
* gdb.base/jit.exp (compile_jit_test): Don't download file
when local.
* gdb.base/list.exp: Use gdb_remote_download.
* gdb.base/maint.exp: Use standard_output_file.
* gdb.base/prelink.exp: Use standard_output_file.
* gdb.base/save-bp.exp: Use standard_output_file.
* gdb.base/sepdebug.exp: Use standard_testfile,
standard_output_file.
(test_different_dir): Don't declare objdir.
* gdb.base/solib-search.exp: Use standard_output_file.
* gdb.base/step-line.exp: Use gdb_remote_download.
* gdb.base/trace-commands.exp: Use standard_output_file.
Diffstat (limited to 'gdb/testsuite/gdb.base/sepdebug.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/sepdebug.exp | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/gdb/testsuite/gdb.base/sepdebug.exp b/gdb/testsuite/gdb.base/sepdebug.exp index 9e956c7..632a43e 100644 --- a/gdb/testsuite/gdb.base/sepdebug.exp +++ b/gdb/testsuite/gdb.base/sepdebug.exp @@ -29,9 +29,7 @@ # test running programs # -set testfile "sepdebug" -set srcfile ${testfile}.c -set binfile ${objdir}/${subdir}/${testfile}${EXEEXT} +standard_testfile .c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } { untested sepdebug.exp @@ -54,14 +52,15 @@ if [gdb_gnu_strip_debug $binfile] { # PR gdb/9538. Verify that symlinked executable still finds the separate # debuginfo. # -set old_subdir ${subdir} -set subdir ${subdir}/pr9538 +set old_subdir $subdir +set subdir [file join ${old_subdir} pr9538] # Cleanup any stale state. -remote_exec build "rm -rf ${subdir}" +set new_name [standard_output_file ${testfile}${EXEEXT}] +remote_exec build "rm -rf [file dirname $new_name]" -remote_exec build "mkdir ${subdir}" -remote_exec build "ln -s ${binfile} ${subdir}" +remote_exec build "mkdir [file dirname $new_name]" +remote_exec build "ln -s ${binfile} $new_name" clean_restart ${testfile}${EXEEXT} if { $gdb_file_cmd_debug_info != "debug" } then { fail "No debug information found." @@ -650,7 +649,7 @@ test_next_with_recursion proc test_different_dir {type test_different_dir xfail} { with_test_prefix "$type" { - global srcdir subdir objdir binfile srcfile timeout gdb_prompt + global srcdir subdir binfile srcfile timeout gdb_prompt global bp_location6 decimal hex gdb_exit @@ -750,11 +749,11 @@ proc test_different_dir {type test_different_dir xfail} { # now move the .debug file to a different location so that we can test # the "set debug-file-directory" command. -set different_dir "${objdir}/${subdir}/${testfile}.dir" -set debugfile "${different_dir}/${objdir}/${subdir}/${testfile}.debug" +set different_dir [standard_output_file ${testfile}.dir] +set debugfile "${different_dir}/[standard_output_file ${testfile}.debug]" remote_exec build "rm -rf $different_dir" remote_exec build "mkdir -p [file dirname $debugfile]" -remote_exec build "mv -f ${objdir}/${subdir}/${testfile}.debug $debugfile" +remote_exec build "mv -f [standard_output_file ${testfile}.debug] $debugfile" test_different_dir debuglink $different_dir 0 @@ -762,17 +761,17 @@ test_different_dir debuglink $different_dir 0 # Test CRC mismatch is reported. if {[build_executable sepdebug.exp sepdebug2 sepdebug2.c debug] != -1 - && ![gdb_gnu_strip_debug ${objdir}/${subdir}/sepdebug2]} { + && ![gdb_gnu_strip_debug [standard_output_file sepdebug2]]} { - remote_exec build "cp ${debugfile} ${objdir}/${subdir}/sepdebug2.debug" + remote_exec build "cp ${debugfile} [standard_output_file sepdebug2.debug]" gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir - set escapedobjdirsubdir [string_to_regexp ${objdir}/${subdir}] + set escapedobjdirsubdir [string_to_regexp [standard_output_file {}]] - gdb_test "file ${objdir}/${subdir}/sepdebug2" "warning: the debug information found in \"${escapedobjdirsubdir}/sepdebug2\\.debug\" does not match \"${escapedobjdirsubdir}/sepdebug2\" \\(CRC mismatch\\)\\..*\\(no debugging symbols found\\).*" "CRC mismatch is reported" + gdb_test "file [standard_output_file sepdebug2]" "warning: the debug information found in \"${escapedobjdirsubdir}/sepdebug2\\.debug\" does not match \"${escapedobjdirsubdir}/sepdebug2\" \\(CRC mismatch\\)\\..*\\(no debugging symbols found\\).*" "CRC mismatch is reported" } @@ -797,17 +796,17 @@ if ![string compare $build_id_debug_filename ""] then { pass $test } - file mkdir [file dirname ${objdir}/${subdir}/${build_id_debug_filename}] - remote_exec build "mv $debugfile ${objdir}/${subdir}/${build_id_debug_filename}" + file mkdir [file dirname [standard_output_file ${build_id_debug_filename}]] + remote_exec build "mv $debugfile [standard_output_file ${build_id_debug_filename}]" - test_different_dir build-id "${objdir}/${subdir}" $xfail + test_different_dir build-id [standard_output_file {}] $xfail # Test also multiple directories can be specified. Without the build-id # reference GDB would find the separate debug info just at the same # location as the executable file. - test_different_dir multiple-dirs "/doesnotexist:${objdir}/${subdir}" $xfail + test_different_dir multiple-dirs "/doesnotexist:[standard_output_file {}]" $xfail # Spare debug files may confuse testsuite runs in the future. - remote_exec build "rm -f ${objdir}/${subdir}/${build_id_debug_filename}" + remote_exec build "rm -f [standard_output_file ${build_id_debug_filename}]" } |