Update of test cases that are crashed by cpulimit command
[occt.git] / tests / bugs / moddata_1 / bug22759
CommitLineData
dc5bdbfc 1puts "TODO ?OCC12345 ALL: Process killed by CPU limit"
3bea4c16 2puts "TODO OCC11111 ALL: TEST INCOMPLETE"
3
dc5bdbfc 4cpulimit 30
3bea4c16 5
6puts "============"
7puts "OCC22759"
8puts "============"
9puts ""
10#######################################################################
11# Crash during shape visualization
12#######################################################################
13
14set BugNumber OCC22759
15
16catch { pload XDE }
17
18restore [locate_data_file OCC22759-weldt6.brep] result
19checkshape result
20tclean result
21
22set Deflection 0.001
23incmesh result ${Deflection}
24
25set tri_info [trinfo result]
26regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
27regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
28
29regexp {deflection +([-0-9.+eE]+)} $tri_info full defl
30
31set os "ALL"
32if {[array get env os_type] != ""} {
33 set os $env(os_type)
34}
35
36if { [regexp {Windows} $os ] } {
37 puts "OS = Windows NT"
38 set good_tri 248672
39 set good_nod 127078
40 set good_defl 0.0028424483708953232
41} else {
42 puts "OS = Linux"
43 set good_tri 248724
44 set good_nod 127104
45 set good_defl 0.0028424483709341111
46}
47
48proc GetPercent {Value GoodValue} {
49 set Percent 0.
50 if {${GoodValue} != 0.} {
51 set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
52 } elseif {${Value} != 0.} {
53 set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
54 } else {
55 set Percent 0.
56 }
57 return ${Percent}
58}
59
60set percent_max 0.1
61set status 0
62
63set triangle_percent [GetPercent ${tri} ${good_tri}]
64puts "triangle_percent = ${triangle_percent}"
65if { ${triangle_percent} > ${percent_max} } {
66 puts "triangle: Faulty ${BugNumber}"
67 set status 1
68} else {
69 puts "triangle: OK ${BugNumber}"
70}
71
72set node_percent [GetPercent ${nod} ${good_nod}]
73puts "node_percent = ${node_percent}"
74if { ${node_percent} > ${percent_max} } {
75 puts "node: Faulty ${BugNumber}"
76 set status 1
77} else {
78 puts "node: OK ${BugNumber}"
79}
80
81set deflection_percent [GetPercent ${defl} ${good_defl}]
82puts "deflection_percent = ${deflection_percent}"
83if { ${deflection_percent} > ${percent_max} } {
84 puts "deflection: Faulty ${BugNumber}"
85 set status 1
86} else {
87 puts "deflection: OK ${BugNumber}"
88}
89
90# Resume
91puts ""
92if { ${status} != 0 } {
93 puts "Faulty ${BugNumber}"
94} else {
95 puts "OK ${BugNumber}"
96}
97
98vinit
99vdisplay result
100vfit
101
102vsetdispmode 1
103
104set only_screen 1
105set square 0