diff options
author | Yao Qi <yao@codesourcery.com> | 2014-09-29 20:47:30 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-10-20 13:34:28 +0800 |
commit | acbdb7f355f9dfa851dcff3154944a0d96771b0e (patch) | |
tree | e96ad56f9b500542b0deb11731d858da901ee956 /gdb/testsuite/gdb.dwarf2 | |
parent | c6ecbe44d87c71dc97f5d305c47cc3f7d4510e57 (diff) | |
download | gdb-acbdb7f355f9dfa851dcff3154944a0d96771b0e.zip gdb-acbdb7f355f9dfa851dcff3154944a0d96771b0e.tar.gz gdb-acbdb7f355f9dfa851dcff3154944a0d96771b0e.tar.bz2 |
Don't remove files copied to host
Nowadays, if we do in-tree build and run tests sequentially, some source
files are removed, due to the following pattern:
set pi_txt [gdb_remote_download host ${srcdir}/${subdir}/pi.txt]
remote_exec host "rm -f $pi_txt"
If testing is run sequentially, file ${srcdir}/${subdir}/pi.txt is
copied to ${objdir}/${subdir}/pi.txt. However, ${objdir} is ${srcdir}
in the in-tree build/test, so the file is coped to itself, as a nop.
As a result, the file in source is removed at the end of test.
This patch fixes this problem by not removing files copied to host in
each test. This patch also addresses the question we've had that why
don't we keep files copied to host because they are needed to reproduce
certain fails.
gdb/testsuite:
2014-10-20 Yao Qi <yao@codesourcery.com>
* gdb.base/checkpoint.exp: Don't remove file copied on host.
* gdb.base/step-line.exp: Likewise.
* gdb.dwarf2/dw2-anonymous-func.exp: Likewise.
* gdb.dwarf2/dw2-basic.exp: Likewise.
* gdb.dwarf2/dw2-compressed.exp: Likewise.
* gdb.dwarf2/dw2-filename.exp: Likewise.
* gdb.dwarf2/dw2-intercu.exp: Likewise.
* gdb.dwarf2/dw2-intermix.exp: Likewise.
* gdb.dwarf2/dw2-producer.exp: Likewise.
* gdb.dwarf2/mac-fileno.exp: Likewise.
* gdb.python/py-frame-args.exp: Likewise.
* gdb.python/py-framefilter.exp: Likewise.
* gdb.python/py-mi.exp: Likewise.
* gdb.python/py-objfile-script.exp: Likewise
* gdb.python/py-pp-integral.exp: Likewise.
* gdb.python/py-pp-re-notag.exp: Likewise.
* gdb.python/py-prettyprint.exp: Likewise.
* gdb.python/py-section-script.exp: Likewise.
* gdb.python/py-typeprint.exp: Likewise.
* gdb.python/py-xmethods.exp: Likewise.
* gdb.stabs/weird.exp: Likewise.
* gdb.xml/tdesc-regs.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-basic.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-compressed.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-filename.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-intercu.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-intermix.exp | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-producer.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/mac-fileno.exp | 5 |
8 files changed, 8 insertions, 30 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp index 029104b..817c988 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp @@ -29,11 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} # Force the debugger to create the file1.txt symtab, to make sure that # the debugger does not crash doing so. gdb_test "list file1.txt:1" "File 1 Line 1.*File 1 Line 8" "list file1.txt" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp index 7823eaa..c5d5b0a 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-basic.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-basic.exp @@ -29,11 +29,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp index 76009d2..7a783b7 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp @@ -31,11 +31,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp index c9ead97..95b4aeb 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-filename.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-filename.exp @@ -28,8 +28,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} clean_restart ${testfile} @@ -42,5 +41,3 @@ gdb_test "interpreter-exec mi -file-list-exec-source-files" \ # And `info sources' should return the fullname incl. the directories. gdb_test "info sources" {[/\\]file1\.txt} - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp index 4a23c96..ce1c15f 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp @@ -42,5 +42,3 @@ gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int2 \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp index 2f95572..1d5d237 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp @@ -29,11 +29,9 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host \ + ${srcdir}/${subdir}/${dwarf_srcfile} gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp index 6846b17..6d786fe 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-producer.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-producer.exp @@ -27,11 +27,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} diff --git a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp index e736211..7711cb3 100644 --- a/gdb/testsuite/gdb.dwarf2/mac-fileno.exp +++ b/gdb/testsuite/gdb.dwarf2/mac-fileno.exp @@ -30,11 +30,8 @@ if {[prepare_for_testing_full $testfile.exp \ return -1 } -set remote_dwarf_srcfile [gdb_remote_download host \ - ${srcdir}/${subdir}/${dwarf_srcfile}] +gdb_remote_download host ${srcdir}/${subdir}/${dwarf_srcfile} gdb_test_no_output "set listsize 1" gdb_test "list func_cu1" "4\[ \t\]+File 1 Line 4" gdb_test "ptype func_cu1" "type = int \\(\\)" - -remote_file host delete ${remote_dwarf_srcfile} |