6 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 2 of the License, or |
# the Free Software Foundation; either version 2 of the License, or |
8 |
# (at your option) any later version. |
# (at your option) any later version. |
9 |
# |
# |
10 |
# This program is distributed in the hope that it will be useful, |
# This program is distributed in the hope that it will be useful, |
11 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
# GNU General Public License for more details. |
14 |
# |
# |
15 |
# You should have received a copy of the GNU General Public License |
# You should have received a copy of the GNU General Public License |
16 |
# along with this program; if not, write to the Free Software |
# along with this program; if not, write to the Free Software |
17 |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
18 |
|
|
19 |
# Please email any bugs, comments, and/or additions to this file to: |
# Please email any bugs, comments, and/or additions to this file to: |
20 |
# |
# |
21 |
|
|
22 |
# This file was written by Rob Savoye. (rob@welcomehome.org) |
# This file was written by Rob Savoye. (rob@welcomehome.org) |
23 |
# and modified by Jan-Willem Neurdenburg. (neurdenburgj@acm.org) |
# and modified by Jan-Willem Neurdenburg. (neurdenburgj@acm.org) |
77 |
set configfile site.exp ;# (local to this file) |
set configfile site.exp ;# (local to this file) |
78 |
set multipass "" ;# list of passes and var settings |
set multipass "" ;# list of passes and var settings |
79 |
set target_abbrev "unix" ;# environment (unix, sim, vx, etc.). |
set target_abbrev "unix" ;# environment (unix, sim, vx, etc.). |
80 |
set errno ""; ;# |
set errno ""; ;# |
81 |
# |
# |
82 |
# set communication parameters here |
# set communication parameters here |
83 |
# |
# |
200 |
set level [lindex $args [expr $i+1]] |
set level [lindex $args [expr $i+1]] |
201 |
} |
} |
202 |
set message [lindex $args $i] |
set message [lindex $args $i] |
203 |
|
|
204 |
if { $verbose >= $level } { |
if { $verbose >= $level } { |
205 |
# There is no need for the "--" argument here, but play it safe. |
# There is no need for the "--" argument here, but play it safe. |
206 |
# We assume send_user also sends the text to the log file (which |
# We assume send_user also sends the text to the log file (which |
228 |
global target_triplet |
global target_triplet |
229 |
global target_alias |
global target_alias |
230 |
global host_triplet |
global host_triplet |
231 |
|
|
232 |
if [string match $target_triplet $host_triplet] { |
if [string match $target_triplet $host_triplet] { |
233 |
return $name |
return $name |
234 |
} |
} |
258 |
# arg2 is optional, and it's what gets returned if |
# arg2 is optional, and it's what gets returned if |
259 |
# the file doesn't exist. |
# the file doesn't exist. |
260 |
# |
# |
261 |
proc findfile { args } { |
proc findfile { args } { |
262 |
# look for the file |
# look for the file |
263 |
verbose "Seeing if [lindex $args 0] exists." 2 |
verbose "Seeing if [lindex $args 0] exists." 2 |
264 |
if [file exists [lindex $args 0]] { |
if [file exists [lindex $args 0]] { |
520 |
break |
break |
521 |
} |
} |
522 |
} |
} |
523 |
|
|
524 |
# get the canonical config name |
# get the canonical config name |
525 |
if ![info exists config_guess] { |
if ![info exists config_guess] { |
526 |
send_error "ERROR: Couldn't guess configuration.\n" |
send_error "ERROR: Couldn't guess configuration.\n" |
782 |
"--sr*" { # (--srcdir) where the testsuite source code lives |
"--sr*" { # (--srcdir) where the testsuite source code lives |
783 |
# Already parsed, but parse again to make sure command line |
# Already parsed, but parse again to make sure command line |
784 |
# options override any config file. |
# options override any config file. |
785 |
|
|
786 |
set srcdir $optarg |
set srcdir $optarg |
787 |
continue |
continue |
788 |
} |
} |
933 |
clone_output "Test Run By $logname on [timestamp -format %c]" |
clone_output "Test Run By $logname on [timestamp -format %c]" |
934 |
if [is3way] { |
if [is3way] { |
935 |
clone_output "Target is $target_triplet" |
clone_output "Target is $target_triplet" |
936 |
clone_output "Host is $host_triplet" |
clone_output "Host is $host_triplet" |
937 |
clone_output "Build is $build_triplet" |
clone_output "Build is $build_triplet" |
938 |
} else { |
} else { |
939 |
if [isnative] { |
if [isnative] { |
956 |
# be purely host based. Unknown is mostly for error trapping. |
# be purely host based. Unknown is mostly for error trapping. |
957 |
# |
# |
958 |
|
|
959 |
set found 0 |
set found 0 |
960 |
if ![info exists target_abbrev] { |
if ![info exists target_abbrev] { |
961 |
set target_abbrev "unix" |
set target_abbrev "unix" |
962 |
} |
} |
1099 |
# We can't call `perror' here, it resets `errorInfo' |
# We can't call `perror' here, it resets `errorInfo' |
1100 |
# before we want to look at it. Also remember that perror |
# before we want to look at it. Also remember that perror |
1101 |
# increments `errcnt'. If we do call perror we'd have to |
# increments `errcnt'. If we do call perror we'd have to |
1102 |
# reset errcnt afterwards. |
# reset errcnt afterwards. |
1103 |
clone_output "ERROR: tcl error sourcing $test_name." |
clone_output "ERROR: tcl error sourcing $test_name." |
1104 |
if [info exists errorInfo] { |
if [info exists errorInfo] { |
1105 |
clone_output "ERROR: $errorInfo" |
clone_output "ERROR: $errorInfo" |