From: Yao Qi Date: Fri, 15 Aug 2014 03:28:39 +0000 (+0800) Subject: Copy xml files to host X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b22089abcba7cc3be26a9ab7d60e01299ac13ea0;p=binutils-gdb.git Copy xml files to host When I run test with board file local-remote-host-native.exp, I see the following warning, $ make check RUNTESTFLAGS="--host_board=local-remote-host-native --target_board=local-remote-host-native tdesc-arch.exp HOST_DIR=/tmp/foo/" (gdb) set tdesc filename ../../../../git/gdb/testsuite/gdb.xml/trivial.xml^M warning: Could not open "../../../../git/gdb/testsuite/gdb.xml/trivial.xml" (gdb) quit^ because "${srcdir}/gdb.xml/trivial.xml" doesn't exist on host. This patch is to copy trivial.xml to host and the warning goes away. (gdb) set tdesc filename /tmp/foo/trivial.xml^M (gdb) quit^ tdesc-regs.exp has the similar problem that single-reg.xml may not exist on host at all, and it should be copied to host too. gdb/testsuite: 2014-10-17 Yao Qi * lib/gdb.exp (gdb_skip_xml_test): Copy trivial.xml to host. * gdb.xml/tdesc-regs.exp: Copy single-reg.xml to host. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 872fd86d2ef..e4878f701a9 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-10-17 Yao Qi + + * lib/gdb.exp (gdb_skip_xml_test): Copy trivial.xml to host. + * gdb.xml/tdesc-regs.exp: Copy single-reg.xml to host. + 2014-10-17 Pedro Alves PR gdb/17471 diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index 0e4547ce362..35c5c5ac53a 100644 --- a/gdb/testsuite/gdb.xml/tdesc-regs.exp +++ b/gdb/testsuite/gdb.xml/tdesc-regs.exp @@ -75,8 +75,12 @@ switch -glob -- [istarget] { # support target-defined registers. Verify that we get a warning if # we try to use them. This not only tests the warning, but also # reminds maintainers to add test support when they add the feature. + +set single_reg_xml [gdb_remote_download host \ + "$srcdir/$subdir/single-reg.xml"] + if {[string equal ${core-regs} ""]} { - gdb_test "set tdesc file $srcdir/$subdir/single-reg.xml" \ + gdb_test "set tdesc file $single_reg_xml" \ "warning: Target-supplied registers are not supported.*" \ "set tdesc file single-reg.xml" unsupported "register tests" @@ -87,7 +91,7 @@ if {[string equal ${core-regs} ""]} { # Make sure we reject a description missing standard registers, # like the PC. -gdb_test "set tdesc file $srcdir/$subdir/single-reg.xml" \ +gdb_test "set tdesc file $single_reg_xml" \ "warning: Architecture rejected target-supplied description" \ "set tdesc file single-reg.xml" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 7ac75a0449a..9918169ce56 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4202,9 +4202,11 @@ gdb_caching_proc gdb_skip_xml_test { global gdb_prompt global srcdir + set xml_file [gdb_remote_download host "${srcdir}/gdb.xml/trivial.xml"] + gdb_start set xml_missing 0 - gdb_test_multiple "set tdesc filename ${srcdir}/gdb.xml/trivial.xml" "" { + gdb_test_multiple "set tdesc filename $xml_file" "" { -re ".*XML support was disabled at compile time.*$gdb_prompt $" { set xml_missing 1 }