This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PUSHED/OBV][PATCH] Testsuite: compile-cplus-print.exp: Start inferior before compiling
- From: Alan Hayward <alan dot hayward at arm dot com>
- To: gdb-patches at sourceware dot org
- Cc: nd at arm dot com, Alan Hayward <alan dot hayward at arm dot com>
- Date: Fri, 19 Oct 2018 11:02:55 +0100
- Subject: [PUSHED/OBV][PATCH] Testsuite: compile-cplus-print.exp: Start inferior before compiling
skip_compile_feature_tests is only valid if the inferior has already
been started (see proc comments). Move the runto_main earlier.
2018-10-19 Alan Hayward <alan.hayward@arm.com>
* gdb.compile/compile-cplus-print.exp: Start inferior earlier.
---
gdb/testsuite/gdb.compile/compile-cplus-print.exp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-print.exp b/gdb/testsuite/gdb.compile/compile-cplus-print.exp
index 5b84b142f1..3427cddf08 100644
--- a/gdb/testsuite/gdb.compile/compile-cplus-print.exp
+++ b/gdb/testsuite/gdb.compile/compile-cplus-print.exp
@@ -33,6 +33,10 @@ if { [eval build_executable_from_specs ${testfile}.exp $testfile {$options} ${sr
clean_restart ${testfile}
+if ![runto_main] {
+ return -1
+}
+
if {[skip_compile_feature_tests]} {
untested "compile command not supported (could not find libcc1 shared library?)"
return -1
@@ -41,10 +45,6 @@ if {[skip_compile_feature_tests]} {
gdb_test_no_output "set language c++" \
"Set language to C++"
-if ![runto_main] {
- return -1
-}
-
gdb_test "compile print varint" " = 10"
gdb_test "compile print vararray" " = \\{1, 2, 3, 4, 5\\}"
--
2.17.1 (Apple Git-112)