diff options
author | Tanya Lattner <tonic@nondot.org> | 2007-11-06 22:32:17 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2007-11-06 22:32:17 +0000 |
commit | 5de0daf6b142e60e105071d428d33ef731311568 (patch) | |
tree | e7bfdd66644ac368e8a617b7c4fcbc0ffd553081 /llvm/test/lib | |
parent | 453ab7d126692c23688dac169a02cd9d2d4b36f6 (diff) | |
download | bcm5719-llvm-5de0daf6b142e60e105071d428d33ef731311568.tar.gz bcm5719-llvm-5de0daf6b142e60e105071d428d33ef731311568.zip |
Implement the XTARGET feature for PR1778
This will mark a test as PASS for all targets specified. It will override whatever is in XFAIL.
llvm-svn: 43788
Diffstat (limited to 'llvm/test/lib')
-rw-r--r-- | llvm/test/lib/llvm.exp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/llvm/test/lib/llvm.exp b/llvm/test/lib/llvm.exp index 921bcb5ddd7..2116b7a92c1 100644 --- a/llvm/test/lib/llvm.exp +++ b/llvm/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 } } } |