OSDN Git Service

PR testsuite/25247
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Dec 2005 19:06:11 +0000 (19:06 +0000)
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 5 Dec 2005 19:06:11 +0000 (19:06 +0000)
* lib/target-supports-dg.exp (dg-skip-if): Fix target selector for
use in selector expressions.
(dg-xfail-if): Ditto.
* gcc.test-framework/dg-dot-run-sif-exp-P.c: New test.
* gcc.test-framework/dg-dot-run-sif-exp-U.c: New test.
* gcc.test-framework/dg-dot-run-xif-exp-P.c: New test.
* gcc.test-framework/dg-dot-run-xif-exp-XP.c: New test.
* gcc.test-framework/test-framework.exp: Skip generated tests if
CHECK_TEST_FRAMEWORK is not 1.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108069 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-P.c [new file with mode: 0644]
gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-U.c [new file with mode: 0644]
gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-P.c [new file with mode: 0644]
gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-XP.c [new file with mode: 0644]
gcc/testsuite/gcc.test-framework/test-framework.exp
gcc/testsuite/lib/target-supports-dg.exp

index c7ac56a..05418ed 100644 (file)
@@ -1,3 +1,16 @@
+2005-12-05  Janis Johnson  <janis187@us.ibm.com>
+
+       PR testsuite/25247
+       * lib/target-supports-dg.exp (dg-skip-if): Fix target selector for
+       use in selector expressions.
+       (dg-xfail-if): Ditto.
+       * gcc.test-framework/dg-dot-run-sif-exp-P.c: New test.
+       * gcc.test-framework/dg-dot-run-sif-exp-U.c: New test.
+       * gcc.test-framework/dg-dot-run-xif-exp-P.c: New test.
+       * gcc.test-framework/dg-dot-run-xif-exp-XP.c: New test.
+       * gcc.test-framework/test-framework.exp: Skip generated tests if
+       CHECK_TEST_FRAMEWORK is not 1.
+
 2005-12-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR tree-optimization/24963
 2005-12-05  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        PR tree-optimization/24963
diff --git a/gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-P.c
new file mode 100644 (file)
index 0000000..bf47361
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do run { target { *-*-* && yes } } } */
+/* { dg-skip-if "comment" { no && yes } { "*" } { "" } } */
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-U.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-sif-exp-U.c
new file mode 100644 (file)
index 0000000..65008c8
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do run { target { *-*-* || no } } } */
+/* { dg-skip-if "comment" { *-*-* && yes } { "*" } { "" } } */
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-P.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-P.c
new file mode 100644 (file)
index 0000000..eb2af26
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do run { target { *-*-* && yes } } } */
+/* { dg-xfail-if "comment" { empty-*-* && yes } { "*" } { "" } } */
+
+int
+main ()
+{
+  return 0;
+}
diff --git a/gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-XP.c b/gcc/testsuite/gcc.test-framework/dg-dot-run-xif-exp-XP.c
new file mode 100644 (file)
index 0000000..59cb768
--- /dev/null
@@ -0,0 +1,8 @@
+/* { dg-do compile { target { *-*-* empty-*-* } } } */
+/* { dg-xfail-if "comment" { *-*-* && yes } { "*" } { "" } } */
+
+int
+main ()
+{
+  return 0;
+}
index 2e4236a..495ffe2 100644 (file)
@@ -51,6 +51,12 @@ dg-init
 # Run tests from the source directory.
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dg-*.c]] "" ""
 
 # Run tests from the source directory.
 dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/dg-*.c]] "" ""
 
+# Skip generated tests unless CHECK_TEST_FRAMEWORK is 1.
+if { $env(CHECK_TEST_FRAMEWORK) != 1 } {
+    verbose "skipping generated test framework tests, CHECK_TEST_FRAMEWORK is not 1" 0
+    return
+}
+
 # Generate additional tests.
 set tstobjdir "$tmpdir/gcc.test-framework"
 set generator "$srcdir/$subdir/gen_directive_tests"
 # Generate additional tests.
 set tstobjdir "$tmpdir/gcc.test-framework"
 set generator "$srcdir/$subdir/gen_directive_tests"
index b595149..4f77f85 100644 (file)
@@ -183,7 +183,7 @@ proc check_test_flags { args } {
 proc dg-skip-if { args } {
     set args [lreplace $args 0 0]
 
 proc dg-skip-if { args } {
     set args [lreplace $args 0 0]
 
-    set selector "target [join [lindex $args 1]]"
+    set selector [list target [lindex $args 1]]
     if { [dg-process-target $selector] == "S" } {
        # The target list matched; now check the flags.  The DejaGnu proc
        # check_conditional_xfail will look at the options in compiler_flags,
     if { [dg-process-target $selector] == "S" } {
        # The target list matched; now check the flags.  The DejaGnu proc
        # check_conditional_xfail will look at the options in compiler_flags,
@@ -223,7 +223,7 @@ proc dg-xfail-if { args } {
     }
 
     set args [lreplace $args 0 0]
     }
 
     set args [lreplace $args 0 0]
-    set selector "target [join [lindex $args 1]]"
+    set selector [list target [lindex $args 1]]
     if { [dg-process-target $selector] == "S" } {
        global compiler_conditional_xfail_data
        set compiler_conditional_xfail_data [lreplace $args 1 1 "*-*-*"]
     if { [dg-process-target $selector] == "S" } {
        global compiler_conditional_xfail_data
        set compiler_conditional_xfail_data [lreplace $args 1 1 "*-*-*"]