~ubuntu-branches/ubuntu/feisty/dejagnu/feisty

« back to all changes in this revision

Viewing changes to testsuite/libdejagnu/tunit.exp

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Jacobowitz
  • Date: 2004-02-09 15:07:58 UTC
  • Revision ID: james.westby@ubuntu.com-20040209150758-oaj7r5zrop60v8sb
Tags: upstream-1.4.4
ImportĀ upstreamĀ versionĀ 1.4.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 1992 - 2002, 2003 Free Software Foundation, Inc.
 
2
 
 
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.
 
7
#
 
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.
 
12
#
 
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.
 
16
 
 
17
# Please email any bugs, comments, and/or additions to this file to:
 
18
# bug-dejagnu@gnu.org
 
19
 
 
20
load_lib "dejagnu.exp"
 
21
 
 
22
# Uncomment these for debugging help
 
23
#strace $tracelevel
 
24
# exp_internal -f dbg.log 1
 
25
 
 
26
# Execute everything in the test subdir so all the output files go there.
 
27
cd $subdir
 
28
 
 
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
 
33
}
 
34
 
 
35
# Extract the text section size
 
36
set textsize [lindex $sizes 0]
 
37
 
 
38
# Extract the data section size
 
39
set datasize [lindex $sizes 1]
 
40
 
 
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"
 
47
 
 
48
# Execute the test case, and analyse the output
 
49
if { [host_execute "unit"] != "" } {
 
50
    perror "unit had an execution error" 0
 
51
}
 
52
 
 
53
# All done, back to the top level test directory
 
54
cd ..
 
55
 
 
56
 
 
57
 
 
58
 
 
59
 
 
60
 
 
61