[binutils-gdb/gdb-7.11-branch] Make gdb.base/jit.exp binaries unique
Pedro Alves
palves@sourceware.org
Thu Mar 31 18:38:00 GMT 2016
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=89df5d6cce0e91c4b34c7a62ba4a68756a8ed4e7
commit 89df5d6cce0e91c4b34c7a62ba4a68756a8ed4e7
Author: Pedro Alves <palves@redhat.com>
Date: Thu Mar 31 19:28:47 2016 +0100
Make gdb.base/jit.exp binaries unique
This testcase compiles the same program and library differently
multiple times using the same file names. Make them unique, to make
it easier to debug test problems.
gdb/testsuite/ChangeLog:
2016-03-31 Pedro Alves <palves@redhat.com>
PR gdb/19858
* gdb.base/jit.exp (compile_jit_test): Add intro comment. Add
BINSUFFIX parameter, and handle it.
(top level): Adjust calls compile_jit_test.
Diff:
---
gdb/testsuite/ChangeLog | 7 +++++++
gdb/testsuite/gdb.base/jit.exp | 19 ++++++++++---------
2 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3b932e9..5f2b91b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2016-03-31 Pedro Alves <palves@redhat.com>
+
+ PR gdb/19858
+ * gdb.base/jit.exp (compile_jit_test): Add intro comment. Add
+ BINSUFFIX parameter, and handle it.
+ (top level): Adjust calls compile_jit_test.
+
2016-03-17 Markus Metzger <markus.t.metzger@intel.com>
PR gdb/19829
diff --git a/gdb/testsuite/gdb.base/jit.exp b/gdb/testsuite/gdb.base/jit.exp
index b51b878..3e12301 100644
--- a/gdb/testsuite/gdb.base/jit.exp
+++ b/gdb/testsuite/gdb.base/jit.exp
@@ -24,18 +24,19 @@ if {[get_compiler_info]} {
return 1
}
-#
-# test running programs
-#
+# Compile the testcase program and library. BINSUFFIX is the suffix
+# to append to the program and library filenames, to make them unique
+# between invocations. OPTIONS is passed to gdb_compile when
+# compiling the program.
-proc compile_jit_test {testname options} {
+proc compile_jit_test {testname binsuffix options} {
global testfile srcfile binfile srcdir subdir
global solib_testfile solib_srcfile solib_binfile solib_binfile_test_msg
global solib_binfile_target
set testfile jit-main
set srcfile ${testfile}.c
- set binfile [standard_output_file $testfile]
+ set binfile [standard_output_file $testfile$binsuffix]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
executable [concat debug $options]] != "" } {
untested $testname
@@ -44,8 +45,8 @@ proc compile_jit_test {testname options} {
set solib_testfile "jit-solib"
set solib_srcfile "${srcdir}/${subdir}/${solib_testfile}.c"
- set solib_binfile [standard_output_file ${solib_testfile}.so]
- set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}.so"
+ set solib_binfile [standard_output_file ${solib_testfile}$binsuffix.so]
+ set solib_binfile_test_msg "SHLIBDIR/${solib_testfile}$binsuffix.so"
# Note: compiling without debug info: the library goes through
# symbol renaming by munging on its symbol table, and that
@@ -109,7 +110,7 @@ proc one_jit_test {count match_str} {
}
}
-if {[compile_jit_test jit.exp {}] < 0} {
+if {[compile_jit_test jit.exp "" {}] < 0} {
return
}
one_jit_test 1 "${hex} jit_function_0000"
@@ -117,7 +118,7 @@ one_jit_test 2 "${hex} jit_function_0000\[\r\n\]+${hex} jit_function_0001"
with_test_prefix PIE {
if {[compile_jit_test "jit.exp PIE tests" \
- {additional_flags=-fPIE ldflags=-pie}] < 0} {
+ "-pie" {additional_flags=-fPIE ldflags=-pie}] < 0} {
return
}
More information about the Gdb-cvs
mailing list