2013-04-15 Siva Chandra Reddy <sivachandra@google.com>
Add option to link testcases with Pthreads library when using 'prepare_for_testing' in tests. testsuite/ * lib/gdb.exp (build_executable_from_specs): Use gdb_compile_pthreads to compile if option "pthreads" is specified.
This commit is contained in:
parent
b340913d3d
commit
a0d3f2f58f
|
@ -1,3 +1,12 @@
|
|||
2013-04-15 Siva Chandra Reddy <sivachandra@google.com>
|
||||
|
||||
Add option to link testcases with Pthreads library when
|
||||
using 'prepare_for_testing' in tests.
|
||||
|
||||
* lib/gdb.exp (build_executable_from_specs): Use
|
||||
gdb_compile_pthreads to compile if option "pthreads" is
|
||||
specified.
|
||||
|
||||
2013-04-15 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* gdb.cp/exceptprint.exp: Add regexp catchpoint tests.
|
||||
|
|
|
@ -3995,7 +3995,8 @@ proc test_prefix_command_help { command_list expected_initial_lines args } {
|
|||
# different options to be passed to different sub-compilations.
|
||||
# TESTNAME is the name of the test; this is passed to 'untested' if
|
||||
# something fails.
|
||||
# OPTIONS is passed to the final link, using gdb_compile.
|
||||
# OPTIONS is passed to the final link, using gdb_compile. If OPTIONS
|
||||
# contains the option "pthreads", then gdb_compile_pthreads is used.
|
||||
# ARGS is a flat list of source specifications, of the form:
|
||||
# { SOURCE1 OPTIONS1 [ SOURCE2 OPTIONS2 ]... }
|
||||
# Each SOURCE is compiled to an object file using its OPTIONS,
|
||||
|
@ -4017,10 +4018,19 @@ proc build_executable_from_specs {testname executable options args} {
|
|||
lappend objects "${binfile}${i}.o"
|
||||
incr i
|
||||
}
|
||||
|
||||
if { [gdb_compile $objects "${binfile}" executable $options] != "" } {
|
||||
untested $testname
|
||||
return -1
|
||||
|
||||
set pthreads [lsearch -exact $options "pthreads"]
|
||||
if { $pthreads >= 0 } {
|
||||
set options [lreplace $options $pthreads $pthreads]
|
||||
if { [gdb_compile_pthreads $objects "${binfile}" executable $options] != "" } {
|
||||
untested $testname
|
||||
return -1
|
||||
}
|
||||
} else {
|
||||
if { [gdb_compile $objects "${binfile}" executable $options] != "" } {
|
||||
untested $testname
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
||||
set info_options ""
|
||||
|
|
Loading…
Reference in New Issue