From 722c45960343adfadb41c0d154c4d43611828e32 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Wed, 22 Mar 2023 09:37:41 +0100 Subject: [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. --- gdb/testsuite/lib/gdb.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/testsuite/lib') 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. -- cgit v1.1