| 1 |
set test "optim" |
| 2 |
if {![installtest_p]} { untested $test; return } |
| 3 |
|
| 4 |
foreach runtime [get_runtime_list] { |
| 5 |
set test "optim" |
| 6 |
if {$runtime != ""} { |
| 7 |
lappend test "($runtime)" |
| 8 |
spawn stap --runtime=$runtime $srcdir/$subdir/optim.stp |
| 9 |
} else { |
| 10 |
spawn stap $srcdir/$subdir/optim.stp |
| 11 |
} |
| 12 |
set ok 0 |
| 13 |
expect { |
| 14 |
-timeout 120 |
| 15 |
-re {i=1} { incr ok ; exp_continue } |
| 16 |
-re {j=2} { incr ok } |
| 17 |
timeout { fail "$test (timeout)" } |
| 18 |
eof { } |
| 19 |
} |
| 20 |
catch { close }; catch { wait } |
| 21 |
if {$ok == 2} { pass $test } { fail $test } |
| 22 |
} |