diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-09-14 10:05:08 +0800 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2009-09-14 10:05:08 +0800 |
commit | 38070723b06baf781ef18e2516e33e6bdbe18d8f (patch) | |
tree | 53b7a3cf4c657d748dd224deb251bf7665460c33 /testsuite/systemtap.syscall/test.tcl | |
parent | 22ce80766c4f31a218da1694569523eb68737faf (diff) | |
download | systemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.tar.gz systemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.tar.xz systemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.zip |
PR10608: mark test cases untested once compilation failed
* testsuite/systemtap.syscall/syscall.exp: Simplify logic things.
* testsuite/systemtap.syscall/test.tcl: Check compilation result.
* testsuite/systemtap.base/utrace_syscall_args.exp: Change fail to
untested.
Diffstat (limited to 'testsuite/systemtap.syscall/test.tcl')
-rwxr-xr-x | testsuite/systemtap.syscall/test.tcl | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl index 8a5801af..b9d3c0d9 100755 --- a/testsuite/systemtap.syscall/test.tcl +++ b/testsuite/systemtap.syscall/test.tcl @@ -26,19 +26,23 @@ proc bgerror {error} { } trap {cleanup_and_exit} SIGINT -proc run_one_test {filename flags} { +proc run_one_test {filename flags bits} { global dir current_dir set testname [file tail [string range $filename 0 end-2]] - set result "UNSUPP" if {[catch {exec mktemp -d [pwd]/staptestXXXXXX} dir]} { puts stderr "Failed to create temporary directory: $dir" cleanup } - target_compile $filename $dir/$testname executable $flags - + set res [target_compile $filename $dir/$testname executable $flags] + if { $res != "" } { + send_log "$bits-bit $testname : no corresponding devel environment found\n" + untested "$bits-bit $testname" + return + } + set sys_prog "[file dirname [file normalize $filename]]/sys.stp" set cmd "stap --skip-badvars -c $dir/${testname} ${sys_prog}" @@ -74,7 +78,8 @@ proc run_one_test {filename flags} { if {$ind == 0} { # unsupported cleanup - return $result + unsupported "$bits-bit $testname not supported on this arch" + return } set current_dir [pwd] @@ -91,10 +96,9 @@ proc run_one_test {filename flags} { } } if {$i >= $ind} { - set result "PASS" # puts "PASS $testname" + pass "$bits-bit $testname" } else { - set result "FAIL $testname" send_log "$testname FAILED. output of \"$cmd\" was:" send_log "\n------------------------------------------\n" send_log $output @@ -118,7 +122,8 @@ proc run_one_test {filename flags} { for {} {$i < $ind} {incr i} { send_log "$results($i)\n" } + fail "$bits-bit $testname" } cleanup - return $result + return } |