| 1 |
set test "out2" |
| 2 |
set tpath "$srcdir/$subdir/$test.stp" |
| 3 |
set TEST_NAME "$subdir/$test" |
| 4 |
|
| 5 |
if {![installtest_p]} { untested $TEST_NAME; return } |
| 6 |
|
| 7 |
foreach runtime [get_runtime_list] { |
| 8 |
set TEST_NAME "$subdir/$test" |
| 9 |
if {$runtime != ""} { |
| 10 |
lappend TEST_NAME "($runtime)" |
| 11 |
} |
| 12 |
|
| 13 |
if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { |
| 14 |
puts stderr "Failed to create temporary file: $tmpfile" |
| 15 |
untested $TEST_NAME |
| 16 |
continue |
| 17 |
} |
| 18 |
|
| 19 |
if {$runtime != ""} { |
| 20 |
set rc [catch {exec stap --runtime=$runtime -o $tmpfile $tpath} res] |
| 21 |
} else { |
| 22 |
set rc [catch {exec stap -o $tmpfile $tpath} res] |
| 23 |
} |
| 24 |
if {$rc} { |
| 25 |
fail $TEST_NAME |
| 26 |
puts "$res" |
| 27 |
catch {exec rm -f $tmpfile} |
| 28 |
continue |
| 29 |
} |
| 30 |
|
| 31 |
if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { |
| 32 |
fail $TEST_NAME |
| 33 |
puts "$res" |
| 34 |
catch {exec rm -f $tmpfile} |
| 35 |
continue |
| 36 |
} |
| 37 |
|
| 38 |
pass $TEST_NAME |
| 39 |
catch {exec rm -f $tmpfile} |
| 40 |
} |
| 41 |
|