Clean up gdb.trace test results on targets not supporting this feature.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.trace / tspeed.exp
index bc12afd0a83111c4d5522b4195eb4929d7058ff1..b77f412363ed7bf38c209c4884268509505d275f 100644 (file)
 
 load_lib "trace-support.exp"
 
+if {[skip_shlib_tests]} {
+    return 0
+}
+
 standard_testfile
 set executable $testfile
 
+# Check that the target supports trace.
+if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable $options] != "" } {
+    untested "failed to compile"
+    return -1
+}
+
+clean_restart ${testfile}
+
+if ![runto_main] {
+    fail "can't run to main to check for trace support"
+    return -1
+}
+
+if ![gdb_target_supports_trace] {
+    unsupported "target does not support trace"
+    return -1
+}
+
+# Compile the test case with the in-process agent library.
 set ipalib [get_in_proc_agent]
 
 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \
This page took 0.025521 seconds and 4 git commands to generate.