summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-11 17:59:05 +0000
committerjanis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>2004-11-11 17:59:05 +0000
commit025057871f87f6a1c04c69e79084468204168dae (patch)
treef63a838be0abd6979f16153bc871e65410572354
parent8f658699fef14cbdc1aceb4617e70da01ae14af8 (diff)
downloadgcc-025057871f87f6a1c04c69e79084468204168dae.tar.gz
* lib/gcc-dg.exp (skip_test_and_clear_xfail): New procedure.
(dg-require-weak, dg-require-visibility, dg-require-alias, dg-require-gc-sections, dg-require-profiling, dg-require-dll, dg-require-iconv, dg-require-named-sections): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90486 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp60
2 files changed, 36 insertions, 29 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0849f1d1604..f0f8dda8af3 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2004-11-11 Janis Johnson <janis187@us.ibm.com>
+ * lib/gcc-dg.exp (skip_test_and_clear_xfail): New procedure.
+ (dg-require-weak, dg-require-visibility, dg-require-alias,
+ dg-require-gc-sections, dg-require-profiling, dg-require-dll,
+ dg-require-iconv, dg-require-named-sections): Use it.
+
* lib/gcc-dg.exp (dg-xfail-if): Ignore if skipping the test.
2004-11-11 Nathan Sidwell <nathan@codesourcery.com>
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 81fbd048330..7e833bcbdae 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -320,19 +320,31 @@ proc gcc-dg-debug-runtest { target_compile trivial opt_opts testcases } {
}
}
-# If this target does not support weak symbols, skip this test.
+# Skip a test and clear all xfail flags that might have been set for it
+# by dg-xfail-if or for the xfail list in dg-do. A procedure that calls
+# this must specify "upvar dg-do-what dg-do-what".
-proc dg-require-weak { args } {
+proc skip_test_and_clear_xfail { } {
+ global compiler_conditional_xfail_data
upvar dg-do-what dg-do-what
- upvar name name
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ if [info exists compiler_conditional_xfail_data] {
+ unset compiler_conditional_xfail_data
+ }
+}
+
+# If this target does not support weak symbols, skip this test.
+
+proc dg-require-weak { args } {
set weak_available [ check_weak_available ]
if { $weak_available == -1 } {
+ upvar name name
unresolved "$name"
}
if { $weak_available != 1 } {
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ upvar dg-do-what dg-do-what
+ skip_test_and_clear_xfail
}
}
@@ -340,16 +352,14 @@ proc dg-require-weak { args } {
# test.
proc dg-require-visibility { args } {
- upvar dg-do-what dg-do-what
- upvar name name
-
set visibility_available [ check_visibility_available ]
if { $visibility_available == -1 } {
+ upvar name name
unresolved "$name"
}
if { $visibility_available != 1 } {
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ upvar dg-do-what dg-do-what
+ skip_test_and_clear_xfail
}
}
@@ -357,16 +367,14 @@ proc dg-require-visibility { args } {
# test.
proc dg-require-alias { args } {
- upvar dg-do-what dg-do-what
- upvar name name
-
set alias_available [ check_alias_available ]
if { $alias_available == -1 } {
+ upvar name name
unresolved "$name"
}
if { $alias_available < 2 } {
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ upvar dg-do-what dg-do-what
+ skip_test_and_clear_xfail
}
}
@@ -376,8 +384,7 @@ proc dg-require-alias { args } {
proc dg-require-gc-sections { args } {
if { ![ check_gc_sections_available ] } {
upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ skip_test_and_clear_xfail
}
}
@@ -386,8 +393,7 @@ proc dg-require-gc-sections { args } {
proc dg-require-profiling { args } {
if { ![ check_profiling_available ${args} ] } {
upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ skip_test_and_clear_xfail
}
}
@@ -407,27 +413,23 @@ proc dg-require-dll { args } {
}
upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ skip_test_and_clear_xfail
}
proc dg-require-iconv { args } {
if { ![ check_iconv_available ${args} ] } {
upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- return
+ skip_test_and_clear_xfail
}
- return
}
# If this target does not support named sections skip this test.
proc dg-require-named-sections { args } {
- upvar name name
-
- if { ![ check_named_sections_available ] } {
- upvar dg-do-what dg-do-what
- set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
- }
+ if { ![ check_named_sections_available ] } {
+ upvar dg-do-what dg-do-what
+ skip_test_and_clear_xfail
+ }
}
# Prune any messages matching ARGS[1] (a regexp) from test output.