Fix GDB build failure when $development is false
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.gdb / unittest.exp
index 44e93290b6202a039ddc5ac47a3cf32c443f7fa2..1c835850b8d30ef9cb0ddebddf70ee79ec56f473 100644 (file)
 set do_xml_test [expr ![gdb_skip_xml_test]]
 
 gdb_start
-gdb_test "maintenance selftest" "Ran $decimal unit tests, 0 failed"
+
+set test "maintenance selftest"
+gdb_test_multiple $test $test {
+  -re "Ran ($decimal) unit tests, 0 failed\r\n$gdb_prompt $" {
+       set num_ran $expect_out(1,string)
+       gdb_assert "$num_ran > 0" $test
+  }
+
+  -re "Selftests are not available in a non-development build.\r\n$gdb_prompt $" {
+       unsupported $test
+  }
+}
 
 if { ![is_remote host] && $do_xml_test } {
     gdb_test "maintenance check xml-descriptions ${srcdir}/../features" \
This page took 0.024757 seconds and 4 git commands to generate.