aboutsummaryrefslogtreecommitdiffstats
path: root/test/lib/llvm.exp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2007-11-06 22:32:17 +0000
committerTanya Lattner <tonic@nondot.org>2007-11-06 22:32:17 +0000
commit090659d657d623819d9ec35ca914064d9ff0e1bb (patch)
tree21b4750dc247d36f8991549ca5b112aeaeb5c53f /test/lib/llvm.exp
parentc37e3ba235860e7ac24911a879457e298b9ed087 (diff)
downloadexternal_llvm-090659d657d623819d9ec35ca914064d9ff0e1bb.zip
external_llvm-090659d657d623819d9ec35ca914064d9ff0e1bb.tar.gz
external_llvm-090659d657d623819d9ec35ca914064d9ff0e1bb.tar.bz2
Implement the XTARGET feature for PR1778
This will mark a test as PASS for all targets specified. It will override whatever is in XFAIL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43788 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lib/llvm.exp')
-rw-r--r--test/lib/llvm.exp35
1 files changed, 31 insertions, 4 deletions
diff --git a/test/lib/llvm.exp b/test/lib/llvm.exp
index 921bcb5..2116b7a 100644
--- a/test/lib/llvm.exp
+++ b/test/lib/llvm.exp
@@ -104,7 +104,10 @@ proc RunLLVMTests { test_source_files } {
set filename [file tail $test]
set outcome PASS
set tmpFile "$filename.tmp"
-
+
+ # Mark that it should not be XFAIL for this target.
+ set targetPASS 0
+
#set hasRunline bool to check if testcase has a runline
set numLines 0
@@ -145,12 +148,36 @@ proc RunLLVMTests { test_source_files } {
#split up target if more then 1 specified
foreach target [split $targets ,] {
if { [regexp {\*} $target match] } {
- set outcome XFAIL
+ if {$targetPASS != 1} {
+ set outcome XFAIL
+ }
+ } elseif { [regexp $target $target_triplet match] } {
+ if {$targetPASS != 1} {
+ set outcome XFAIL
+ }
+ } elseif { [regexp {llvmgcc(([0-9]+)|([0-9]+[.][0-9]+))} $target match submatch submatch2] } {
+ if { [regexp ^($submatch)$|^(($submatch)(\.)) $llvmgcc_version match] } {
+ if {$targetPASS != 1} {
+ set outcome XFAIL
+ }
+ }
+ }
+ }
+ } elseif {[regexp {XTARGET:[ *](.+)} $line match targets]} {
+ set targets
+
+ #split up target if more then 1 specified
+ foreach target [split $targets ,] {
+ if { [regexp {\*} $target match] } {
+ set targetPASS 1
+ set outcome PASS
} elseif { [regexp $target $target_triplet match] } {
- set outcome XFAIL
+ set targetPASS 1
+ set outcome PASS
} elseif { [regexp {llvmgcc(([0-9]+)|([0-9]+[.][0-9]+))} $target match submatch submatch2] } {
if { [regexp ^($submatch)$|^(($submatch)(\.)) $llvmgcc_version match] } {
- set outcome XFAIL
+ set targetPASS 1
+ set outcome PASS
}
}
}