This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Copy xml files to host if it is remote


Hi,

>  gdb_test "maint print c-tdesc" "
> diff --git a/gdb/testsuite/gdb.xml/tdesc-errors.exp b/gdb/testsuite/gdb.xml/tdesc-errors.exp
> index 19f42a1..c639b91 100644
> --- a/gdb/testsuite/gdb.xml/tdesc-errors.exp
> +++ b/gdb/testsuite/gdb.xml/tdesc-errors.exp
> @@ -26,8 +26,14 @@ proc set_bad_arch { srcfile errmsg } {
>      global subdir
>
>      # Anchor the test output, so that error messages are detected.
> -    set cmd "set tdesc filename $srcdir/$subdir/$srcfile"
> -    set msg "set tdesc filename $subdir/$srcfile"
> +    if { [is_remote host] } {
> +	remote_download host "$srcdir/$subdir/$srcfile" $srcfile
> +	set cmd "set tdesc filename $srcfile"
> +	set msg "set tdesc filename $srcfile"
> +    } else {
> +	set cmd "set tdesc filename $srcdir/$subdir/$srcfile"
> +	set msg "set tdesc filename $subdir/$srcfile"
> +    }

It'd be better for test comparison if $msg did not depend on
how the test was ran, e.g., by doing:

  set msg "set tdesc filename $srcfile"

unconditionally.

This is OK with that change, here, and whereever else
necessary.  I noticed at least one other spot.

Thanks,
-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]