OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [libcdl/] [testsuite/] [config/] [default.exp] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
#===============================================================================
2
#
3
#    default.exp
4
#
5
#    Support for host-side testing
6
#
7
#===============================================================================
8
# ####ECOSHOSTGPLCOPYRIGHTBEGIN####
9
# -------------------------------------------
10
# This file is part of the eCos host tools.
11
# Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
12
#
13
# This program is free software; you can redistribute it and/or modify
14
# it under the terms of the GNU General Public License as published by
15
# the Free Software Foundation; either version 2 or (at your option) any
16
# later version.
17
#
18
# This program is distributed in the hope that it will be useful, but
19
# WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21
# General Public License for more details.
22
#
23
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, write to the
25
# Free Software Foundation, Inc., 51 Franklin Street,
26
# Fifth Floor, Boston, MA  02110-1301, USA.
27
# -------------------------------------------
28
# ####ECOSHOSTGPLCOPYRIGHTEND####
29
#===============================================================================
30
######DESCRIPTIONBEGIN####
31
#
32
# Author(s):    bartv
33
# Contributors: bartv
34
# Date:         1999-01-06
35
#
36
#####DESCRIPTIONEND####
37
#===============================================================================
38
#
39
 
40
# The host-side libcdl tests will only run on the hosts, i.e.
41
# only native testing is possible.
42
if { [isnative] != 1 } {
43
    perror "Only native testing is supported."
44
    exit 1
45
}
46
 
47
# Most of the test harness lives in a file hosttest.exp. This is part
48
# of the host-side infrastructure.
49
 
50
set filename [file join $::srcdir "../../infra/hosttest.exp"]
51
set status [ catch { source $filename } message]
52
if { $status != 0 } {
53
    perror "Unexpected error while reading in the support script $filename\n$message"
54
    exit 1
55
}
56
 
57
# Now that the hosttest.exp utilities are available it is possible to do
58
# a bit more initialization. In particular it is possible to read in the
59
# build tree's Makefile and look for definitions of CC, CXX, and any
60
# other information from the Makefile that may prove useful.
61
hosttest_initialize
62
 
63
# There are standard routines ${tool}_start, ${tool}_load, ${tool}_exit
64
# and ${tool}_version which test harnesses should normally implement.
65
# In practice runtest only invokes ${tool}_exit and ${tool}_version
66
# directly, the rest may or may not be invoked from inside the individual
67
# test scripts.
68
#
69
# ${tool}_version is relatively straightforward. The master version
70
# number is maintained in the configure.in script and is exported to
71
# the build tree's Makefile. There is a hosttest routine which does the
72
# hard work because getting the information is common to all host
73
# packages. The _version routine itself cannot be made completely generic
74
# because the first output is package-specific.
75
 
76
proc ${tool}_version { } {
77
 
78
    set status   [ catch { hosttest_extract_version } message]
79
    if { $status != 0 } {
80
        perror $message
81
        return
82
    }
83
    clone_output "[file join $::objdir libcdl.a] $message"
84
}
85
 
86
# ${tool}_start does not serve any useful purpose when it comes to
87
# testing libcdl.a - there is no tool which can be started up.
88
# Therefore none of the individual test scripts will invoke this
89
# routine.
90
 
91
proc ${tool}_start { } {
92
    perror "CDL is a library, not a tool, and cannot be started."
93
}
94
 
95
# ${tool}_load is used to load a test case into the tool. The exact
96
# meaning is not applicable. However it makes sense to have this
97
# routine provide an alias for hosttest_run_simple_test which provides
98
# all the libraries etc. that are going to be needed.
99
 
100
proc ${tool}_load { program { args ""} } {
101
    hosttest_run_simple_test $program {} [list] [list] [list "cdl"] $args
102
}
103
 
104
# ${tool}_exit does not serve any useful purpose here.
105
proc ${tool}_exit { } {
106
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.