Corrections for tests after integration of 2012-12-07
[occt.git] / tests / bugs / caf / bug114
CommitLineData
a87752f3 1puts "==========="
2puts "OCC114"
3puts "==========="
4
c2f5c748 5# Max number of iterations for computing memory leackage
a87752f3 6set i_max 20
7puts "Amount of iterations is $i_max"
a87752f3 8
9NewDocument D MDTV-Standard
10UndoLimit D 10
11
a87752f3 12restore [locate_data_file OCC114.brep] s
a87752f3 13
c2f5c748 14set listmem {}
a87752f3 15for {set i 1} {${i} <= ${i_max}} {incr i} {
16
c2f5c748 17 OpenCommand D
18 SetShape D 0:1 s
19 AbortCommand D
a87752f3 20
c2f5c748 21 # check memory usage (with tolerance equal to half page size)
22 lappend listmem [expr [meminfo w] / 1024]
23 if { [checktrend $listmem 0 1 "Memory leak detected"] } {
24 puts "No memory leak, $i iterations"
25 break
26 }
a87752f3 27}