From patchwork Thu Oct 16 13:31:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 3246 Received: (qmail 10879 invoked by alias); 16 Oct 2014 13:36:28 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 10868 invoked by uid 89); 16 Oct 2014 13:36:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 16 Oct 2014 13:36:26 +0000 Received: from svr-orw-fem-06.mgc.mentorg.com ([147.34.97.120]) by relay1.mentorg.com with esmtp id 1XelE6-0003oH-QC from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 16 Oct 2014 06:36:22 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.3.181.6; Thu, 16 Oct 2014 06:36:22 -0700 From: Yao Qi To: Subject: [PATCH] Copy xml files to host Date: Thu, 16 Oct 2014 21:31:13 +0800 Message-ID: <1413466273-23012-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes 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-16 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. --- gdb/testsuite/gdb.xml/tdesc-regs.exp | 8 ++++++-- gdb/testsuite/lib/gdb.exp | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.xml/tdesc-regs.exp b/gdb/testsuite/gdb.xml/tdesc-regs.exp index 2bd4cbe..a22b6b9 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 53c35d4..7b2a402 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4213,9 +4213,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 }