This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] testsuite: Fix gcc_compiled for gcc 6 & 7
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 24 Oct 2016 14:51:04 -0400
- Subject: [binutils-gdb] testsuite: Fix gcc_compiled for gcc 6 & 7
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT f90fd8c2f17c7631915103ce5b760830a156ee93 ***
Author(s): Jan Kratochvil <jan.kratochvil@redhat.com>, Nick Clifton <nickc@redhat.com>, Yao Qi <yao.qi@linaro.org>
Branch: master
Commit: f90fd8c2f17c7631915103ce5b760830a156ee93
commit f90fd8c2f17c7631915103ce5b760830a156ee93
Author: Jan Kratochvil <jan.kratochvil@redhat.com>
AuthorDate: Thu Oct 20 21:58:54 2016 +0200
Commit: Jan Kratochvil <jan.kratochvil@redhat.com>
CommitDate: Thu Oct 20 21:58:54 2016 +0200
testsuite: Fix gcc_compiled for gcc 6 & 7
gdb/testsuite/ChangeLog
2016-10-20 Jan Kratochvil <jan.kratochvil@redhat.com>
* lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5409537..c8709b7 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * lib/gdb.exp (get_compiler_info): Generalize gcc_compile regexp.
+
2016-10-19 Maciej W. Rozycki <macro@imgtec.com>
* gdb.base/killed-outside.exp: Remove $options from a call to
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 378eea0..7d9b198 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -3290,12 +3290,8 @@ proc get_compiler_info {{arg ""}} {
}
# Set the legacy symbols.
- set gcc_compiled 0
- if { [regexp "^gcc-1-" "$compiler_info" ] } { set gcc_compiled 1 }
- if { [regexp "^gcc-2-" "$compiler_info" ] } { set gcc_compiled 2 }
- if { [regexp "^gcc-3-" "$compiler_info" ] } { set gcc_compiled 3 }
- if { [regexp "^gcc-4-" "$compiler_info" ] } { set gcc_compiled 4 }
- if { [regexp "^gcc-5-" "$compiler_info" ] } { set gcc_compiled 5 }
+ set gcc_compiled 0
+ regexp "^gcc-(\[0-9\]+)-" "$compiler_info" matchall gcc_compiled
# Log what happened.
verbose -log "get_compiler_info: $compiler_info"