| 1 |
set test "$srcdir/$subdir/out1.stp" |
| 2 |
set TEST_NAME "$subdir/out1b" |
| 3 |
|
| 4 |
if {![installtest_p]} { untested $TEST_NAME; return } |
| 5 |
|
| 6 |
set stap_merge_path "$srcdir/$subdir/stap_merge.tcl" |
| 7 |
if (![file executable $stap_merge_path]) { |
| 8 |
fail "$TEST_NAME : could not find stap_merge" |
| 9 |
return |
| 10 |
} |
| 11 |
|
| 12 |
if {[catch {exec mktemp -t staptestXXXXXX} tmpfile]} { |
| 13 |
puts stderr "Failed to create temporary file: $tmpfile" |
| 14 |
untested "$TEST_NAME : failed to create temporary file" |
| 15 |
return |
| 16 |
} |
| 17 |
|
| 18 |
if {[catch {exec stap -b -o $tmpfile $test} res]} { |
| 19 |
fail $TEST_NAME |
| 20 |
puts "stap failed: $res" |
| 21 |
eval [list exec /bin/rm -f] [glob "${tmpfile}*"] |
| 22 |
return |
| 23 |
} |
| 24 |
|
| 25 |
if {[catch {eval [list exec $stap_merge_path -o $tmpfile] [glob "${tmpfile}_*"]} res]} { |
| 26 |
puts "merge failed: $res" |
| 27 |
fail $TEST_NAME |
| 28 |
eval [list exec /bin/rm -f] [glob "${tmpfile}*"] |
| 29 |
return |
| 30 |
} |
| 31 |
|
| 32 |
if {[catch {exec cmp $tmpfile $srcdir/$subdir/large_output} res]} { |
| 33 |
puts "$res" |
| 34 |
fail $TEST_NAME |
| 35 |
eval [list exec /bin/rm -f] [glob "${tmpfile}*"] |
| 36 |
return |
| 37 |
} |
| 38 |
|
| 39 |
pass $TEST_NAME |
| 40 |
eval [list exec /bin/rm -f] [glob "${tmpfile}*"] |
| 41 |
|