aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-09-13 20:54:03 +0000
committerDJ Delorie <dj@redhat.com>2004-09-13 20:54:03 +0000
commita3ef5243fb20d1168f47dbd4e9c51461dc665453 (patch)
tree6fe24c0ae6d80c29f204bef60866b8d37802a7e5
parent362646f51708657cb5bc8886426a881f2fb56191 (diff)
downloadgdb-a3ef5243fb20d1168f47dbd4e9c51461dc665453.zip
gdb-a3ef5243fb20d1168f47dbd4e9c51461dc665453.tar.gz
gdb-a3ef5243fb20d1168f47dbd4e9c51461dc665453.tar.bz2
* lib/sim-defs.exp (run_sim_test): Add global_as_options,
global_ld_options, and global_sim_options to all test cases, if defined.
-rw-r--r--sim/testsuite/ChangeLog6
-rw-r--r--sim/testsuite/lib/sim-defs.exp19
2 files changed, 22 insertions, 3 deletions
diff --git a/sim/testsuite/ChangeLog b/sim/testsuite/ChangeLog
index 8c58cf4..7200d39 100644
--- a/sim/testsuite/ChangeLog
+++ b/sim/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2004-09-13 DJ Delorie <dj@redhat.com>
+
+ * lib/sim-defs.exp (run_sim_test): Add global_as_options,
+ global_ld_options, and global_sim_options to all test cases, if
+ defined.
+
2004-05-12 Ben Elliston <bje@au.ibm.com>
* lib/sim-defs.exp: Remove stray semicolons.
diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 0b9ea73..6a88b9c 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -165,6 +165,9 @@ proc run_sim_test { name requested_machs } {
global SIMFLAGS
global opts
global cpu_option
+ global global_as_options
+ global global_ld_options
+ global global_sim_options
if [string match "*/*" $name] {
set file $name
@@ -187,6 +190,16 @@ proc run_sim_test { name requested_machs } {
set opts(timeout) ""
set opts(xerror) "no"
+ if ![info exists global_as_options] {
+ set global_as_options ""
+ }
+ if ![info exists global_ld_options] {
+ set global_ld_options ""
+ }
+ if ![info exists global_sim_options] {
+ set global_sim_options ""
+ }
+
# Clear any machine specific options specified in a previous test case
foreach m $requested_machs {
if [info exists opts(as,$m)] {
@@ -250,7 +263,7 @@ proc run_sim_test { name requested_machs } {
if [info exists cpu_option] {
set as_options "$as_options $cpu_option=$mach"
}
- set comp_output [target_assemble $sourcefile ${name}.o "$as_options"]
+ set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
@@ -262,7 +275,7 @@ proc run_sim_test { name requested_machs } {
set opts(ld,$mach) $opts(ld)
}
- set comp_output [target_link ${name}.o ${name}.x "$opts(ld,$mach)"]
+ set comp_output [target_link ${name}.o ${name}.x "$opts(ld,$mach) $global_ld_options"]
if ![string match "" $comp_output] {
verbose -log "$comp_output" 3
@@ -281,7 +294,7 @@ proc run_sim_test { name requested_machs } {
set options "$options timeout=$opts(timeout)"
}
- set result [sim_run ${name}.x "$opts(sim,$mach)" "" "" "$options"]
+ set result [sim_run ${name}.x "$opts(sim,$mach) $global_sim_options" "" "" "$options"]
set status [lindex $result 0]
set output [lindex $result 1]