1
# Copyright (C) 1992 - 2002, 2003 Free Software Foundation, Inc.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17
# Please email any bugs, comments, and/or additions to this file to:
20
load_lib "dejagnu.exp"
22
# Uncomment these for debugging help
24
# exp_internal -f dbg.log 1
26
# Execute everything in the test subdir so all the output files go there.
29
# Get the size of the module being tested.
30
set sizes [exe_size "unit"]
31
if {[lindex $sizes 0] == "-1"} {
32
perror "Couldn't get the object file size" 0
35
# Extract the text section size
36
set textsize [lindex $sizes 0]
38
# Extract the data section size
39
set datasize [lindex $sizes 1]
41
# FIXME: This ultimately needs to be recorded in the testing database,
42
# which doesn't exist yet. Till then it's kinda bogus, but I figured
43
# it would be useful having working code to get this data. So we print
44
# it out, just for the demo aspects.
45
verbose "Text section size of proctor is 0x$textsize"
46
verbose "Data section size of proctor is 0x$datasize"
48
# Execute the test case, and analyse the output
49
if { [host_execute "unit"] != "" } {
50
perror "unit had an execution error" 0
53
# All done, back to the top level test directory