From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/g++.dg/plugin/plugin.exp | 69 ++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 gcc/testsuite/g++.dg/plugin/plugin.exp (limited to 'gcc/testsuite/g++.dg/plugin/plugin.exp') diff --git a/gcc/testsuite/g++.dg/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp new file mode 100644 index 000000000..72de92dfd --- /dev/null +++ b/gcc/testsuite/g++.dg/plugin/plugin.exp @@ -0,0 +1,69 @@ +# Copyright (C) 2009 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# . + +# Test the functionality of the GCC plugin support + +load_lib target-supports.exp +load_lib g++-dg.exp + +global TESTING_IN_BUILD_TREE +global ENABLE_PLUGIN + +# The plugin testcases currently only work when the build tree is available. +# Also check whether the host supports plugins. +if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } { + return +} + +# If a testcase doesn't have special options, use these. +global DEFAULT_CXXFLAGS +if ![info exists DEFAULT_CXXFLAGS] then { + set DEFAULT_CXXFLAGS " -ansi -pedantic-errors -Wno-long-long" +} + +# The procedures in plugin-support.exp need these parameters. +set default_flags $DEFAULT_CXXFLAGS + +if $tracelevel then { + strace $tracelevel +} + +# Load support procs. +load_lib plugin-support.exp + +# Specify the plugin source file and the associated test files in a list. +# plugin_test_list={ {plugin1 test1 test2 ...} {plugin2 test1 ...} ... } +set plugin_test_list [list \ + { attribute_plugin.c attribute_plugin-test-1.C } \ + { pragma_plugin.c pragma_plugin-test-1.C } \ + { selfassign.c self-assign-test-1.C self-assign-test-2.C self-assign-test-3.C } \ + { dumb_plugin.c dumb-plugin-test-1.C } \ + { header_plugin.c header-plugin-test.C } ] + +foreach plugin_test $plugin_test_list { + # Replace each source file with its full-path name + for {set i 0} {$i < [llength $plugin_test]} {incr i} { + set basename [lindex $plugin_test $i] + set plugin_test [lreplace $plugin_test $i $i $srcdir/$subdir/$basename] + } + set plugin_src [lindex $plugin_test 0] + # If we're only testing specific files and this isn't one of them, skip it. + if ![runtest_file_p $runtests $plugin_src] then { + continue + } + set plugin_input_tests [lreplace $plugin_test 0 0] + plugin-test-execute $plugin_src $plugin_input_tests +} -- cgit v1.2.3