aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2005-02-01 17:37:25 +0000
committerJanis Johnson <janis@gcc.gnu.org>2005-02-01 17:37:25 +0000
commit91442c2081b37f63adb5d0c3f626949abcce406a (patch)
tree9082927fe5de46b203efe64a06be20e624e63746 /gcc
parent0e7eed46026720d0a1a0696128499293913566bf (diff)
downloadgcc-91442c2081b37f63adb5d0c3f626949abcce406a.zip
gcc-91442c2081b37f63adb5d0c3f626949abcce406a.tar.gz
gcc-91442c2081b37f63adb5d0c3f626949abcce406a.tar.bz2
README: Describe tests in source directory.
* gcc.test-framework/README: Describe tests in source directory. * gcc.test-framework/test-framework.awk: Handle dg- tests. * gcc.test-framework/test-framework.exp: Handle dg- tests. * gcc.test-framework/dg-bogus-exp-P.c: New test. * gcc.test-framework/dg-bogus-exp-XF.c: New test. * gcc.test-framework/dg-do-assemble-exp-P.c: New test. * gcc.test-framework/dg-do-compile-exp-P.c: New test. * gcc.test-framework/dg-do-link-exp-P.c: New test. * gcc.test-framework/dg-do-run-exp-P.c: New test. * gcc.test-framework/dg-dot-run-exp-P.c: New test. * gcc.test-framework/dg-dot-run-exp-U.c: New test. * gcc.test-framework/dg-dox-run-exp-XF.c: New test. * gcc.test-framework/dg-error-exp-P.c: New test. * gcc.test-framework/dg-error-exp-XP.c: New test. * gcc.test-framework/dg-excess-errors-exp-XF.c: New test. * gcc.test-framework/dg-excess-errors-exp-XP.c: New test. * gcc.test-framework/dg-output-exp-P.c: New test. * gcc.test-framework/dg-output-exp-XF.c: New test. * gcc.test-framework/dg-warning-exp-P.c: New test. * gcc.misc-tests/dg-1.c: Remove. * gcc.misc-tests/dg-2.c: Remove. * gcc.misc-tests/dg-3.c: Remove. * gcc.misc-tests/dg-4.c: Remove. * gcc.misc-tests/dg-5.c: Remove. * gcc.misc-tests/dg-6.c: Remove. * gcc.misc-tests/dg-7.c: Remove. * gcc.misc-tests/dg-8.c: Remove. * gcc.misc-tests/dg-9.c: Remove. * gcc.misc-tests/dg-10.c: Remove. * gcc.misc-tests/dg-11.c: Remove. * gcc.misc-tests/dg-12.c: Remove. * gcc.misc-tests/dg-test.exp: Remove. From-SVN: r94550
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog33
-rw-r--r--gcc/testsuite/gcc.misc-tests/dg-1.c14
-rw-r--r--gcc/testsuite/gcc.misc-tests/dg-10.c12
-rw-r--r--gcc/testsuite/gcc.misc-tests/dg-2.c11
-rw-r--r--gcc/testsuite/gcc.misc-tests/dg-3.c11
-rw-r--r--gcc/testsuite/gcc.misc-tests/dg-test.exp38
-rw-r--r--gcc/testsuite/gcc.test-framework/README11
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-bogus-exp-P.c8
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c9
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-do-assemble-exp-P.c11
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-do-compile-exp-P.c14
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-do-link-exp-P.c11
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-do-run-exp-P.c (renamed from gcc/testsuite/gcc.misc-tests/dg-4.c)2
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-dot-run-exp-P.c (renamed from gcc/testsuite/gcc.misc-tests/dg-11.c)4
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-dot-run-exp-U.c (renamed from gcc/testsuite/gcc.misc-tests/dg-12.c)2
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-dox-run-exp-XF.c (renamed from gcc/testsuite/gcc.misc-tests/dg-7.c)2
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-error-exp-P.c9
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-error-exp-XP.c11
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XF.c (renamed from gcc/testsuite/gcc.misc-tests/dg-8.c)4
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XP.c9
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-output-exp-P.c (renamed from gcc/testsuite/gcc.misc-tests/dg-5.c)2
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-output-exp-XF.c (renamed from gcc/testsuite/gcc.misc-tests/dg-6.c)2
-rw-r--r--gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c (renamed from gcc/testsuite/gcc.misc-tests/dg-9.c)6
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.awk4
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.exp11
25 files changed, 142 insertions, 109 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7a3356c..1a394f2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,38 @@
2005-02-01 Janis Johnson <janis187@us.ibm.com>
+ * gcc.test-framework/README: Describe tests in source directory.
+ * gcc.test-framework/test-framework.awk: Handle dg- tests.
+ * gcc.test-framework/test-framework.exp: Handle dg- tests.
+ * gcc.test-framework/dg-bogus-exp-P.c: New test.
+ * gcc.test-framework/dg-bogus-exp-XF.c: New test.
+ * gcc.test-framework/dg-do-assemble-exp-P.c: New test.
+ * gcc.test-framework/dg-do-compile-exp-P.c: New test.
+ * gcc.test-framework/dg-do-link-exp-P.c: New test.
+ * gcc.test-framework/dg-do-run-exp-P.c: New test.
+ * gcc.test-framework/dg-dot-run-exp-P.c: New test.
+ * gcc.test-framework/dg-dot-run-exp-U.c: New test.
+ * gcc.test-framework/dg-dox-run-exp-XF.c: New test.
+ * gcc.test-framework/dg-error-exp-P.c: New test.
+ * gcc.test-framework/dg-error-exp-XP.c: New test.
+ * gcc.test-framework/dg-excess-errors-exp-XF.c: New test.
+ * gcc.test-framework/dg-excess-errors-exp-XP.c: New test.
+ * gcc.test-framework/dg-output-exp-P.c: New test.
+ * gcc.test-framework/dg-output-exp-XF.c: New test.
+ * gcc.test-framework/dg-warning-exp-P.c: New test.
+ * gcc.misc-tests/dg-1.c: Remove.
+ * gcc.misc-tests/dg-2.c: Remove.
+ * gcc.misc-tests/dg-3.c: Remove.
+ * gcc.misc-tests/dg-4.c: Remove.
+ * gcc.misc-tests/dg-5.c: Remove.
+ * gcc.misc-tests/dg-6.c: Remove.
+ * gcc.misc-tests/dg-7.c: Remove.
+ * gcc.misc-tests/dg-8.c: Remove.
+ * gcc.misc-tests/dg-9.c: Remove.
+ * gcc.misc-tests/dg-10.c: Remove.
+ * gcc.misc-tests/dg-11.c: Remove.
+ * gcc.misc-tests/dg-12.c: Remove.
+ * gcc.misc-tests/dg-test.exp: Remove.
+
* gcc.test-framework/test-framework.awk: Change recording and
printing of passes and failures.
diff --git a/gcc/testsuite/gcc.misc-tests/dg-1.c b/gcc/testsuite/gcc.misc-tests/dg-1.c
deleted file mode 100644
index 319f8a2..0000000
--- a/gcc/testsuite/gcc.misc-tests/dg-1.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test the tester. */
-/* { dg-prms-id 42 } */
-/* { dg-do compile } */
-
-main () { return 0; }
-
-/* { dg-final { if ![file exists dg-1.s] { fail "dg-1.c (compile)"; return; } } } */
-
-/* { dg-final { set tmp [grep dg-1.s main line] } } */
-/* { dg-final { if ![string match "" $tmp] \{ } } */
-/* { dg-final { pass "dg-1.c (main function present)" } } */
-/* { dg-final { \} else \{ } } */
-/* { dg-final { fail "dg-1.c (main function not present)" } } */
-/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-10.c b/gcc/testsuite/gcc.misc-tests/dg-10.c
deleted file mode 100644
index 6d7b344..0000000
--- a/gcc/testsuite/gcc.misc-tests/dg-10.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Test the tester. */
-/* { dg-prms-id 42 } */
-/* { dg-options "-Wall" } */
-
-/* FIXME: we want to test dg-lose here. Anyone know of a good way to
- crash the compiler? */
-
-int
-main (int argc, char *argv[])
-{
- return 0;
-}
diff --git a/gcc/testsuite/gcc.misc-tests/dg-2.c b/gcc/testsuite/gcc.misc-tests/dg-2.c
deleted file mode 100644
index bb40387..0000000
--- a/gcc/testsuite/gcc.misc-tests/dg-2.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test the tester. */
-/* { dg-prms-id 42 } */
-/* { dg-do assemble } */
-
-main () { return 0; }
-
-/* { dg-final { if [file exists dg-2.o] \{ } } */
-/* { dg-final { pass "dg-2.c (assemble: produce .o test)" } } */
-/* { dg-final { \} else \{ } } */
-/* { dg-final { fail "dg-2.c (assemble: produce .o test)" } } */
-/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-3.c b/gcc/testsuite/gcc.misc-tests/dg-3.c
deleted file mode 100644
index 017ab27..0000000
--- a/gcc/testsuite/gcc.misc-tests/dg-3.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test the tester. */
-/* { dg-prms-id 42 } */
-/* { dg-do link } */
-
-main () { return 0; }
-
-/* { dg-final { if [file exists a.out] \{ } } */
-/* { dg-final { pass "dg-2.c (link: produce a.out test)" } } */
-/* { dg-final { \} else \{ } } */
-/* { dg-final { fail "dg-2.c (link: produce a.out test)" } } */
-/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-test.exp b/gcc/testsuite/gcc.misc-tests/dg-test.exp
deleted file mode 100644
index 820e28d..0000000
--- a/gcc/testsuite/gcc.misc-tests/dg-test.exp
+++ /dev/null
@@ -1,38 +0,0 @@
-# Copyright (C) 1997 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 2 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 this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-# Test the dg.exp driver.
-# This is a testsuite tester tester. As such we *want* to test things like
-# expected failure handling. But expected failures must continually be
-# monitored and so in the normal case we create unnecessary work. So only
-# run these tests if DG_TEST is defined to "yes".
-
-global DG_TEST
-if { ![info exists DG_TEST] || "$DG_TEST" != "yes" } {
- return
-}
-
-# Load support procs.
-load_lib gcc-dg.exp
-
-# Initialize harness.
-dg-init
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dg-*.c]] "" ""
-
-# All done.
-dg-finish
diff --git a/gcc/testsuite/gcc.test-framework/README b/gcc/testsuite/gcc.test-framework/README
index 63fe9dc..3a9d4f0 100644
--- a/gcc/testsuite/gcc.test-framework/README
+++ b/gcc/testsuite/gcc.test-framework/README
@@ -1,10 +1,11 @@
Check the test directives used in GCC's testsuite by generating and
running tests that use combinations of those commands or that stress
-the selector expressions that can be used in those directives.
+the selector expressions that can be used in those directives. Also
+run a few tests of specific functionality from the source directory.
-Each test has two parts: a file ending in "-1.c" whose expected result
-is encoded in the filename after "-exp-", and a file ending in "-2.c"
-which is always expected to pass.
+Each generated test has two parts: a file ending in "-1.c" whose
+expected result is encoded in the filename after "-exp-", and a file
+ending in "-2.c" which is always expected to pass.
This test directory is normally skipped and is not meant to be run at
the same time as other parts of the testsuite; it's only of interest to
@@ -21,4 +22,4 @@ To check the results:
awk -f ${TF}/test-framework.awk gcc/testsuite/gcc.sum
The awk script prints unexpected results followed by the number of tests
-that passed.
+that passed and failed.
diff --git a/gcc/testsuite/gcc.test-framework/dg-bogus-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-bogus-exp-P.c
new file mode 100644
index 0000000..003264a
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-bogus-exp-P.c
@@ -0,0 +1,8 @@
+/* Test the tester; previously part of gcc.misc-tests/dg-9.c. */
+/* { dg-prms-id 42 } */
+/* { dg-options "-Wall" } */
+
+int main (int argc, char *argv[])
+{
+ return 0; /* { dg-bogus "foobar" "bogus fail test" } */
+}
diff --git a/gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c b/gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c
new file mode 100644
index 0000000..60c9147
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-bogus-exp-XF.c
@@ -0,0 +1,9 @@
+/* Test the tester; previously part of gcc.misc-tests/dg-9.c. */
+/* { dg-prms-id 42 } */
+/* { dg-options "-Wall" } */
+
+main (int argc, char *argv[])
+{ /* { dg-bogus "return type" "bogus pass test" { xfail *-*-* } } */
+}
+
+/* { dg-excess-errors "bogus pass test" { xfail *-*-* } } */
diff --git a/gcc/testsuite/gcc.test-framework/dg-do-assemble-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-do-assemble-exp-P.c
new file mode 100644
index 0000000..3165720
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-do-assemble-exp-P.c
@@ -0,0 +1,11 @@
+/* Test the tester; previously gcc.misc-tests/dg-2.c. */
+/* { dg-prms-id 42 } */
+/* { dg-do assemble } */
+
+main () { return 0; }
+
+/* { dg-final { if [file exists dg-do-assemble-exp-P.o] \{ } } */
+/* { dg-final { pass "dg-do-assemble-exp-P.c (assemble: produce .o test)" } } */
+/* { dg-final { \} else \{ } } */
+/* { dg-final { fail "dg-do-assemble-exp-P.c (assemble: produce .o test)" } } */
+/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.test-framework/dg-do-compile-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-do-compile-exp-P.c
new file mode 100644
index 0000000..9385746
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-do-compile-exp-P.c
@@ -0,0 +1,14 @@
+/* Test the tester; previously gcc.misc-tests/dg-1.c. */
+/* { dg-prms-id 42 } */
+/* { dg-do compile } */
+
+main () { return 0; }
+
+/* { dg-final { if ![file exists dg-do-compile-exp-P.s] { fail "dg-do-compile-exp-P.c (compile)"; return; } } } */
+
+/* { dg-final { set tmp [grep dg-do-compile-exp-P.s main line] } } */
+/* { dg-final { if ![string match "" $tmp] \{ } } */
+/* { dg-final { pass "dg-do-compile-exp-P.c (main function present)" } } */
+/* { dg-final { \} else \{ } } */
+/* { dg-final { fail "dg-do-compile-exp-P.c (main function not present)" } } */
+/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.test-framework/dg-do-link-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-do-link-exp-P.c
new file mode 100644
index 0000000..254109e
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-do-link-exp-P.c
@@ -0,0 +1,11 @@
+/* Test the tester; previously gcc.misc-tests/dg-3.c. */
+/* { dg-prms-id 42 } */
+/* { dg-do link } */
+
+main () { return 0; }
+
+/* { dg-final { if [file exists dg-do-link-exp-P.exe] \{ } } */
+/* { dg-final { pass "dg-do-link-exp-P.c (link: produce a.out test)" } } */
+/* { dg-final { \} else \{ } } */
+/* { dg-final { fail "dg-do-link-exp-P.c (link: produce a.out test)" } } */
+/* { dg-final { \} } } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-4.c b/gcc/testsuite/gcc.test-framework/dg-do-run-exp-P.c
index 806bdfb..a7f3ffa 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-4.c
+++ b/gcc/testsuite/gcc.test-framework/dg-do-run-exp-P.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-4.c. */
/* { dg-prms-id 42 } */
/* { dg-do run } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-11.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-exp-P.c
index bfbba4d..3bbc4e1 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-11.c
+++ b/gcc/testsuite/gcc.test-framework/dg-dot-run-exp-P.c
@@ -1,6 +1,6 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-11.c. */
/* { dg-prms-id 42 } */
-/* { dg-do run { target sparc-sun-solaris2* } } */
+/* { dg-do run { target *-*-* } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */
/* { dg-output {Hello world[.]} } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-12.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-exp-U.c
index c6adbf5..9d79604b 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-12.c
+++ b/gcc/testsuite/gcc.test-framework/dg-dot-run-exp-U.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-12.c. */
/* { dg-prms-id 42 } */
/* { dg-do run { target foo-bar-eh } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-7.c b/gcc/testsuite/gcc.test-framework/dg-dox-run-exp-XF.c
index adde4cb..69cff8b 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-7.c
+++ b/gcc/testsuite/gcc.test-framework/dg-dox-run-exp-XF.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-7.c. */
/* { dg-prms-id 42 } */
/* { dg-do run { xfail *-*-* } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.test-framework/dg-error-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-error-exp-P.c
new file mode 100644
index 0000000..cb28e34
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-error-exp-P.c
@@ -0,0 +1,9 @@
+/* Test the tester; previously part of gcc.misc-tests/dg-9.c. */
+/* { dg-prms-id 42 } */
+/* { dg-options "-Wall" } */
+
+int main (int argc, char *argv[])
+{
+ +; /* { dg-error "syntax error" "error test" } */
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.test-framework/dg-error-exp-XP.c b/gcc/testsuite/gcc.test-framework/dg-error-exp-XP.c
new file mode 100644
index 0000000..856b727
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-error-exp-XP.c
@@ -0,0 +1,11 @@
+/* Test the tester; previously part of gcc.misc-tests/dg-9.c. */
+/* { dg-prms-id 42 } */
+/* { dg-options "-Wall" } */
+
+int main (int argc, char *argv[])
+{
+ +;
+ /* { dg-error "syntax error" "error test" { xfail *-*-* } 7 } */
+ return 0;
+}
+/* { dg-excess-errors "expect failure" { xfail *-*-* } } */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-8.c b/gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XF.c
index 63a5b0e..496c6a6 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-8.c
+++ b/gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XF.c
@@ -1,7 +1,7 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-8.c. */
/* { dg-prms-id 42 } */
/* { dg-options "-Wall" } */
-/* { dg-do run } */
+/* { dg-do compile } */
/* { dg-excess-errors "excess errors" } */
/* should get warning about defaulting return type - excess error */
diff --git a/gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XP.c b/gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XP.c
new file mode 100644
index 0000000..4aecca3
--- /dev/null
+++ b/gcc/testsuite/gcc.test-framework/dg-excess-errors-exp-XP.c
@@ -0,0 +1,9 @@
+/* Test the tester. */
+/* { dg-prms-id 42 } */
+/* { dg-options "-Wall" } */
+/* { dg-do compile } */
+/* { dg-excess-errors "excess errors" } */
+
+/* No messages, so unexpected pass. */
+
+int main () { return 0; }
diff --git a/gcc/testsuite/gcc.misc-tests/dg-5.c b/gcc/testsuite/gcc.test-framework/dg-output-exp-P.c
index 178fcb8..4cec76f 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-5.c
+++ b/gcc/testsuite/gcc.test-framework/dg-output-exp-P.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-5.c. */
/* { dg-prms-id 42 } */
/* { dg-do run } */
/* The \n is left out of the pattern because tcl's exec will remove it. */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-6.c b/gcc/testsuite/gcc.test-framework/dg-output-exp-XF.c
index 8323792..6606e5c93 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-6.c
+++ b/gcc/testsuite/gcc.test-framework/dg-output-exp-XF.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously gcc.misc-tests/dg-6.c. */
/* { dg-prms-id 42 } */
/* { dg-do run { target *-*-* } } */
/* The \n is left out of the pattern because tcl's exec will remove it. */
diff --git a/gcc/testsuite/gcc.misc-tests/dg-9.c b/gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c
index b228fff..293e119 100644
--- a/gcc/testsuite/gcc.misc-tests/dg-9.c
+++ b/gcc/testsuite/gcc.test-framework/dg-warning-exp-P.c
@@ -1,4 +1,4 @@
-/* Test the tester. */
+/* Test the tester; previously part of gcc.misc-tests/dg-9.c. */
/* { dg-prms-id 42 } */
/* { dg-options "-Wall" } */
@@ -8,8 +8,4 @@ f ()
main (int argc, char *argv[])
{ /* { dg-warning "return type" "warning test" } */
- +; /* { dg-error "parse" "error test" } */
- /* { dg-bogus "foobar" "bogus fail test" } */
-
- return a; /* { dg-bogus "undeclared|identifier|appears" "bogus pass test" { xfail *-*-* } } */
} /* { dg-warning "control reaches end" "warning test" } */
diff --git a/gcc/testsuite/gcc.test-framework/test-framework.awk b/gcc/testsuite/gcc.test-framework/test-framework.awk
index 90e76ca..3c7eedb 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.awk
+++ b/gcc/testsuite/gcc.test-framework/test-framework.awk
@@ -47,6 +47,10 @@ BEGIN { skip = 1; passes = 0; fails = 0; }
/^PASS.*dox.*(test for excess errors)/ { ignore(); next }
# Ignore lines that begin with comma.
/^,/ { ignore(); next }
+# For tests of dg-output, ignore successful compilation.
+/^PASS.*dg-output.*(test for excess error)/ { ignore(); next }
+# For tests of dg-output, ignore successful execution.
+/^PASS.*dg-output.*execution test/ { ignore(); next }
/^PASS/ { if (match ($0, "exp-P")) { pass(); next } }
/^FAIL/ { if (match ($0, "exp-F")) { pass(); next } }
/^XPASS/ { if (match ($0, "exp-XP")) { pass(); next } }
diff --git a/gcc/testsuite/gcc.test-framework/test-framework.exp b/gcc/testsuite/gcc.test-framework/test-framework.exp
index 21cdc1f..8bc4ae7 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.exp
+++ b/gcc/testsuite/gcc.test-framework/test-framework.exp
@@ -46,8 +46,12 @@ global dg-do-what-default
set save-dg-do-what-default ${dg-do-what-default}
set dg-do-what-default compile
-# Generate the tests.
+dg-init
+# Run tests from the source directory.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dg-*.c]] "" ""
+
+# Generate additional tests.
set tstobjdir "$tmpdir/gcc.test-framework"
set generator "$srcdir/$subdir/gen_directive_tests"
file delete -force $tstobjdir
@@ -55,12 +59,11 @@ file mkdir $tstobjdir
set status [remote_exec host "$generator $tstobjdir"]
set status [lindex $status 0]
if { $status == 0 } {
- # Run the tests.
- dg-init
+ # Run the generated tests.
dg-runtest [lsort [find $tstobjdir *.c]] "" "-DY1 -DY2"
- dg-finish
} else {
warning "Could not generate test framework tests"
}
+dg-finish
set dg-do-what-default ${save-dg-do-what-default}