Skip 'maintenance check xml-descriptions' if XML is disabled
authorYao Qi <yao.qi@linaro.org>
Fri, 15 Dec 2017 10:45:27 +0000 (10:45 +0000)
committerYao Qi <yao.qi@linaro.org>
Fri, 15 Dec 2017 10:45:27 +0000 (10:45 +0000)
I see the following test failure when gdb is configured without XML
support,

maintenance check xml-descriptions binutils-gdb/gdb/testsuite/../features
warning: Can not parse XML target description; XML support was disabled at compile time^M
Tested 29 XML files, 29 failed
(gdb) FAIL: gdb.gdb/unittest.exp: maintenance check xml-descriptions ${srcdir}/../features

gdb/testsuite:

2017-12-15  Yao Qi  <yao.qi@linaro.org>

* gdb.gdb/unittest.exp: Skip 'maintenance check xml-descriptions'
if XML is disabled.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.gdb/unittest.exp

index 84ad6d610519a6b0de7b7e714a2cc510ed2a00dc..8d52bb9fc6ba235ed15e1936bd2d07eaf6513717 100644 (file)
@@ -1,3 +1,8 @@
+2017-12-15  Yao Qi  <yao.qi@linaro.org>
+
+       * gdb.gdb/unittest.exp: Skip 'maintenance check xml-descriptions'
+       if XML is disabled.
+
 2017-12-15  Xavier Roirand  <roirand@adacore.com>
 
        * gdb.ada/same_component_name: New testcase.
index 58494e169c5a78e1b237d68fc3617e03dbf50070..7d280d1463828b1bcf75f75e912fe4c03b7a7c09 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+set do_xml_test [expr ![gdb_skip_xml_test]]
+
 gdb_start
 gdb_test "maintenance selftest" "Ran $decimal unit tests, 0 failed"
 
-if { ![is_remote host] } {
+if { ![is_remote host] && $do_xml_test } {
     gdb_test "maintenance check xml-descriptions ${srcdir}/../features" \
        "Tested $decimal XML files, 0 failed" \
        "maintenance check xml-descriptions \${srcdir}/../features"