Clean up gdb.trace test results on targets not supporting this feature.
[binutils-gdb.git] / gdb / testsuite / gdb.trace / tracecmd.exp
index ccbd4ae0cd731d0796b209815a595eeefa8d9d79..de3de8ae171bde3e938e2694b94f7dd1d843f9ee 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright 1998-2013 Free Software Foundation, Inc.
+#   Copyright 1998-2018 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 
 # This file was written by Michael Snyder (msnyder@cygnus.com)
 
-load_lib "trace-support.exp";
+load_lib "trace-support.exp"
 
 
 gdb_exit
 gdb_start
 standard_testfile actions.c
+if ![gdb_trace_common_supports_arch] {
+    unsupported "no trace-common.h support for arch"
+    return -1
+}
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
          executable {debug nowarnings}] != "" } {
-    untested tracecmd.exp
+    untested "failed to compile"
     return -1
 }
 gdb_reinitialize_dir $srcdir/$subdir
@@ -35,10 +39,10 @@ gdb_file_cmd $binfile
 
 # define relative source line numbers:
 # all subsequent line numbers are relative to this first one (baseline)
-set baseline  [gdb_find_recursion_test_baseline $srcfile];
+set baseline  [gdb_find_recursion_test_baseline $srcfile]
 if { $baseline == -1 } then {
-    fail "Could not find gdb_recursion_test function"
-    return;
+    fail "could not find gdb_recursion_test function"
+    return
 }
 
 set testline1 [expr $baseline + 1]
@@ -48,7 +52,7 @@ set testline2 [expr $baseline + 3]
 # test "help tracepoints"
 #
 
-set helpcnt 0;
+set helpcnt 0
 test_class_help "tracepoints" {
     "Tracing of program execution without stopping the program\.[\r\n\]+" 
 } "1.0: help tracepoints"
@@ -161,11 +165,11 @@ gdb_test "help trace" "Set a tracepoint at .*" "1.14: help trace"
 gdb_delete_tracepoints
 
 # Acceptance vs rejection of a location are target-specific, so allow both.
-gdb_test_multiple "ftrace gdb_recursion_test" "Set a fast tracepoint" {
+gdb_test_multiple "ftrace gdb_recursion_test" "set a fast tracepoint" {
     -re "Fast tracepoint $decimal at $hex: file.*$srcfile, line $testline1.*$gdb_prompt $" {
-       pass "Set a fast tracepoint"
+       pass "set a fast tracepoint"
     }
     -re ".*May not have a fast tracepoint at $hex.*$gdb_prompt $" {
-       pass "Declined to set a fast tracepoint"
+       pass "declined to set a fast tracepoint"
     }
 }