diff options
author | Tom de Vries <tdevries@suse.de> | 2023-03-22 09:37:41 +0100 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-03-22 09:37:41 +0100 |
commit | 722c45960343adfadb41c0d154c4d43611828e32 (patch) | |
tree | 4e68a9bd9bc06fc0e5127c5b47f064be6014c5cf /gdb/testsuite/lib | |
parent | 904d9b02a185c9048cf17bf7295b89d7380cea3d (diff) | |
download | gdb-722c45960343adfadb41c0d154c4d43611828e32.zip gdb-722c45960343adfadb41c0d154c4d43611828e32.tar.gz gdb-722c45960343adfadb41c0d154c4d43611828e32.tar.bz2 |
[gdb/testsuite] Fix gdb.cp/*.exp for remote host
Fix a few test-cases in gdb.cp/*.exp for remote host using new proc
include_file.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 6c2d7e1..dd39247 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -9554,6 +9554,18 @@ gdb_caching_proc have_compile_flag { flag } { additional_flags=$flag] } +# Handle include file $srcdir/$subdir/FILE. + +proc include_file { file } { + set file [file join $::srcdir $::subdir $file] + if { [is_remote host] } { + set res [remote_download host $file] + } else { + set res $file + } + + return $res +} # Handle include file FILE, and if necessary update compiler flags variable # FLAGS. |