diff mbox

[cxx-mem-model] handle xfails in the memmodel test harness

Message ID 4E4C1EDF.9060602@redhat.com
State New
Headers show

Commit Message

Aldy Hernandez Aug. 17, 2011, 8:04 p.m. UTC
With this patch we can now XFAIL tests that are expected to fail at 
runtime.  This is how it's used:

/* { dg-final { memmodel-gdb-test { xfail x86*-*-* } } } */

Note, that the test will still run.

This is needed for an upcoming known-to-fail test Andrew will contribute 
shortly.

Committed to branch.

        * lib/gcc-memmodel-gdb-test.exp (memmmodel-gdb-test): Handle

      # A cleaner solution would require a new DejaGnu release.
diff mbox

Patch

Index: lib/gcc-memmodel-gdb-test.exp
===================================================================
--- lib/gcc-memmodel-gdb-test.exp       (revision 177836)
+++ lib/gcc-memmodel-gdb-test.exp       (working copy)
@@ -21,9 +21,15 @@ 
  #
  # Call 'fail' if a given test printed "FAIL:", otherwise call 'pass'.

-proc memmodel-gdb-test { } {
+proc memmodel-gdb-test { args } {
      if { ![isnative] || [is_remote target] } { return }

+    if { [llength $args] == 1 } {
+       switch [dg-process-target [lindex $args 0]] {
+               "F" { setup_xfail "*-*-*" }
+       }
+    }
+
      # This assumes that we are three frames down from dg-test, and that
      # it still stores the filename of the testcase in a local variable 
"name".