]>
Commit | Line | Data |
---|---|---|
912f9e81 | 1 | # |
2 | # Expect driver script for GCC Regression Tests | |
f1717362 | 3 | # Copyright (C) 1993-2016 Free Software Foundation, Inc. |
912f9e81 | 4 | # |
5 | # This file is free software; you can redistribute it and/or modify | |
6 | # it under the terms of the GNU General Public License as published by | |
f63ff66b | 7 | # the Free Software Foundation; either version 3 of the License, or |
912f9e81 | 8 | # (at your option) any later version. |
9 | # | |
10 | # This program is distributed in the hope that it will be useful, | |
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | # GNU General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
f63ff66b | 16 | # along with GCC; see the file COPYING3. If not see |
17 | # <http://www.gnu.org/licenses/>. | |
912f9e81 | 18 | # |
19 | # Written by Jeffrey Wheat (cassidy@cygnus.com) | |
20 | # | |
21 | ||
22 | # | |
23 | # These tests come from Torbjorn Granlund's (tege@cygnus.com) | |
24 | # C torture test suite, and other contributors. | |
25 | # | |
26 | ||
27 | if $tracelevel then { | |
28 | strace $tracelevel | |
29 | } | |
30 | ||
31 | # load support procs | |
32 | load_lib c-torture.exp | |
07e23beb | 33 | load_lib torture-options.exp |
34 | ||
35 | torture-init | |
7bfefa9d | 36 | set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS |
912f9e81 | 37 | |
38 | # | |
39 | # This loop will run c-torture on any *.c file found in this directory. | |
40 | # If a *.c has a corresponding *.exp file, then the test is skipped as | |
41 | # as the *.exp will drive the test itself. It is done this way so that | |
9bccb7a3 | 42 | # generic tests do not need a separate .exp for it. Only the tests that |
912f9e81 | 43 | # require unique options need their own .exp file. |
44 | # | |
45 | ||
e0e707af | 46 | foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.c]] { |
912f9e81 | 47 | if [file exists [file rootname $testcase].exp] then { |
48 | verbose "INFO:\"[file rootname $testcase].exp\" exists, skipping test" 3 | |
49 | continue | |
50 | } | |
51 | ||
52 | # If we're only testing specific files and this isn't one of them, skip it. | |
53 | if ![runtest_file_p $runtests $testcase] then { | |
54 | continue | |
55 | } | |
56 | ||
57 | c-torture $testcase | |
58 | } | |
07e23beb | 59 | |
60 | torture-finish |