diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-13 15:52:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-13 15:52:24 +0000 |
commit | 4e2348988f2e09ced290e012981de941c96bc70c (patch) | |
tree | 3c7f0b0ee7e91677fc5dfb1ff91df9da2c58ec50 /gdb | |
parent | 53e981d986a7eb149de1de6491381a1cb049757c (diff) | |
download | gdb-4e2348988f2e09ced290e012981de941c96bc70c.zip gdb-4e2348988f2e09ced290e012981de941c96bc70c.tar.gz gdb-4e2348988f2e09ced290e012981de941c96bc70c.tar.bz2 |
add standard_temp_file
This adds a new helper proc, standard_temp_file. This proc takes a
file name and returns a possibly-qualified form. This lets us make
parallel runs use a directory other than ".", which helps the inotify
mode.
This initial patch introduces the proc and changes a few spots to use
it.
* lib/gdb.exp (standard_temp_file): New proc.
(support_complex_tests, is_ilp32_target, is_lp64_target)
(is_amd64_regs_target, skip_altivec_tests, skip_vsx_tests): Use
standard_temp_file.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 30 |
2 files changed, 25 insertions, 12 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5f67205..8e42771 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2013-08-13 Tom Tromey <tromey@redhat.com> + * lib/gdb.exp (standard_temp_file): New proc. + (support_complex_tests, is_ilp32_target, is_lp64_target) + (is_amd64_regs_target, skip_altivec_tests, skip_vsx_tests): Use + standard_temp_file. + +2013-08-13 Tom Tromey <tromey@redhat.com> + * lib/gdb.exp (build_id_debug_filename_get): Use standard_output_file. * lib/prelink-support.exp (section_get) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index b89c9cd..901ba6a 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -1708,8 +1708,8 @@ proc support_complex_tests {} { # Set up, compile, and execute a test program containing _Complex types. # Include the current process ID in the file names to prevent conflicts # with invocations for multiple testsuites. - set src complex[pid].c - set exe complex[pid].x + set src [standard_temp_file complex[pid].c] + set exe [standard_temp_file complex[pid].x] set f [open $src "w"] puts $f "int main() {" @@ -1798,8 +1798,8 @@ proc is_ilp32_target {} { } - set src ilp32[pid].c - set obj ilp32[pid].o + set src [standard_temp_file ilp32[pid].c] + set obj [standard_temp_file ilp32[pid].o] set f [open $src "w"] puts $f "int dummy\[sizeof (int) == 4" @@ -1836,8 +1836,8 @@ proc is_lp64_target {} { return $is_lp64_target_saved($board) } - set src lp64[pid].c - set obj lp64[pid].o + set src [standard_temp_file lp64[pid].c] + set obj [standard_temp_file lp64[pid].o] set f [open $src "w"] puts $f "int dummy\[sizeof (int) == 4" @@ -1878,8 +1878,8 @@ proc is_amd64_regs_target {} { return $is_amd64_regs_target_saved($board) } - set src reg64[pid].s - set obj reg64[pid].o + set src [standard_temp_file reg64[pid].s] + set obj [standard_temp_file reg64[pid].o] set f [open $src "w"] foreach reg \ @@ -1960,8 +1960,8 @@ proc skip_altivec_tests {} { # Set up, compile, and execute a test program containing VMX instructions. # Include the current process ID in the file names to prevent conflicts # with invocations for multiple testsuites. - set src vmx[pid].c - set exe vmx[pid].x + set src [standard_temp_file vmx[pid].c] + set exe [standard_temp_file vmx[pid].x] set f [open $src "w"] puts $f "int main() {" @@ -2046,8 +2046,8 @@ proc skip_vsx_tests {} { return 1 } - set src vsx[pid].c - set exe vsx[pid].x + set src [standard_temp_file vsx[pid].c] + set exe [standard_temp_file vsx[pid].x] set f [open $src "w"] puts $f "int main() {" @@ -3401,6 +3401,12 @@ proc standard_output_file {basename} { return [file join $objdir $subdir $basename] } +# Return the name of a file in our standard temporary directory. + +proc standard_temp_file {basename} { + return $basename +} + # Set 'testfile', 'srcfile', and 'binfile'. # # ARGS is a list of source file specifications. |