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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.dg/] [plugin/] [plugin.exp] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
#   Copyright (C) 2009 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 3 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 GCC; see the file COPYING3.  If not see
15
# .
16
 
17
# Test the functionality of the GCC plugin support
18
 
19
load_lib target-supports.exp
20
load_lib gcc-dg.exp
21
 
22
global TESTING_IN_BUILD_TREE
23
global ENABLE_PLUGIN
24
 
25
# The plugin testcases currently only work when the build tree is available.
26
# Also check whether the host supports plugins.
27
if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
28
    return
29
}
30
 
31
# If a testcase doesn't have special options, use these.
32
global DEFAULT_CFLAGS
33
if ![info exists DEFAULT_CFLAGS] then {
34
    set DEFAULT_CFLAGS " -ansi -pedantic-errors"
35
}
36
 
37
# The procedures in plugin-support.exp need these parameters.
38
set default_flags $DEFAULT_CFLAGS
39
 
40
if $tracelevel then {
41
    strace $tracelevel
42
}
43
 
44
# Load support procs.
45
load_lib plugin-support.exp
46
 
47
# Specify the plugin source file and the associated test files in a list.
48
# plugin_test_list={ {plugin1 test1 test2 ...} {plugin2 test1 ...} ... }
49
set plugin_test_list [list \
50
    { selfassign.c self-assign-test-1.c self-assign-test-2.c } \
51
    { ggcplug.c ggcplug-test-1.c } \
52
    { one_time_plugin.c one_time-test-1.c } \
53
    { start_unit_plugin.c start_unit-test-1.c } \
54
    { finish_unit_plugin.c finish_unit-test-1.c } \
55
]
56
 
57
foreach plugin_test $plugin_test_list {
58
    # Replace each source file with its full-path name
59
    for {set i 0} {$i < [llength $plugin_test]} {incr i} {
60
        set basename [lindex $plugin_test $i]
61
        set plugin_test [lreplace $plugin_test $i $i $srcdir/$subdir/$basename]
62
    }
63
    set plugin_src [lindex $plugin_test 0]
64
    # If we're only testing specific files and this isn't one of them, skip it.
65
    if ![runtest_file_p $runtests $plugin_src] then {
66
        continue
67
    }
68
    set plugin_input_tests [lreplace $plugin_test 0 0]
69
    plugin-test-execute $plugin_src $plugin_input_tests
70
}

powered by: WebSVN 2.1.0

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