1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
apn 9aa684edf4 0025987: Integration part of modified unstable test cases
Unstable test cases were reviewed
Modified test cases using checktrend command
Modified test cases for Linux platform
Modified test cases for Debug mode
2015-03-26 18:10:29 +03:00

101 lines
2.2 KiB
Plaintext
Executable File

puts "============"
puts "OCC22759"
puts "============"
puts ""
#######################################################################
# Crash during shape visualization
#######################################################################
set BugNumber OCC22759
catch { pload XDE }
cpulimit 400
restore [locate_data_file OCC22759-weldt6.brep] result
checkshape result
tclean result
set Deflection 0.001
incmesh result ${Deflection}
set tri_info [trinfo result]
regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri
regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod
regexp {deflection +([-0-9.+eE]+)} $tri_info full defl
if { [array get env os_type] != "" } {
set os $env(os_type)
}
if { [string compare $os "windows"] != 0 } {
puts "OS = Linux"
set good_tri 524278
set good_nod 265870
set good_defl 0.0026800432954056617
} else {
puts "OS = Windows NT"
set good_tri 523436
set good_nod 265456
set good_defl 0.0028033497029316067
}
proc GetPercent {Value GoodValue} {
set Percent 0.
if {${GoodValue} != 0.} {
set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
} elseif {${Value} != 0.} {
set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
} else {
set Percent 0.
}
return ${Percent}
}
set percent_max 0.1
set status 0
set triangle_percent [GetPercent ${tri} ${good_tri}]
puts "triangle_percent = ${triangle_percent}"
if { ${triangle_percent} > ${percent_max} } {
puts "triangle: Faulty ${BugNumber}"
set status 1
} else {
puts "triangle: OK ${BugNumber}"
}
set node_percent [GetPercent ${nod} ${good_nod}]
puts "node_percent = ${node_percent}"
if { ${node_percent} > ${percent_max} } {
puts "node: Faulty ${BugNumber}"
set status 1
} else {
puts "node: OK ${BugNumber}"
}
set deflection_percent [GetPercent ${defl} ${good_defl}]
puts "deflection_percent = ${deflection_percent}"
if { ${deflection_percent} > ${percent_max} } {
puts "deflection: Faulty ${BugNumber}"
set status 1
} else {
puts "deflection: OK ${BugNumber}"
}
# Resume
puts ""
if { ${status} != 0 } {
puts "Faulty ${BugNumber}"
} else {
puts "OK ${BugNumber}"
}
vinit
vdisplay result
vfit
vsetdispmode 1
set only_screen 1
set square 9951.34