1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00

0029196: Tests - some test cases fail with Intel HD graphics

Test bugs vis bug26357 is revised to check colors in more robust way.
In tests bugs vis bug29091_*, size of produced file is checked to be within range of known valid sizes, rather than hard-coded (per-platform) exact sizes.
FPE signals are disabled for test bugs vis bug29127 to prevent exceptions cause by software OpenGl driver.

File data/occ/Box.brep is removed to avoid confusion with file box.brep in public data files used in tests.

Two additional non-alphabetic-order combinations of complex types are handled in RWStepAP214_ReadWriteModule.cxx
This commit is contained in:
abv 2017-10-09 13:19:20 +03:00 committed by bugmaster
parent 9e4791171c
commit 7f83633f7e
12 changed files with 84 additions and 369 deletions

View File

@ -1,282 +0,0 @@
DBRep_DrawableShape
CASCADE Topology V1, (c) Matra-Datavision
Locations 0
Curve2ds 24
1 0 0 1 0
1 0 0 1 0
1 50 0 0 -1
1 0 0 0 1
1 0 -80 1 0
1 0 0 1 0
1 0 0 0 -1
1 0 0 0 1
1 0 0 1 0
1 0 77 1 0
1 50 0 0 -1
1 77 0 0 1
1 0 -80 1 0
1 0 77 1 0
1 0 0 0 -1
1 77 0 0 1
1 0 0 0 1
1 0 0 1 0
1 50 0 0 1
1 0 0 1 0
1 0 0 0 1
1 0 80 1 0
1 50 0 0 1
1 0 80 1 0
Curves 12
1 821 803 0 0 0 1
1 821 803 50 0 1 0
1 821 883 0 0 0 1
1 821 803 0 0 1 0
1 898 803 0 0 0 1
1 898 803 50 0 1 0
1 898 883 0 0 0 1
1 898 803 0 0 1 0
1 821 803 0 1 0 0
1 821 803 50 1 0 0
1 821 883 0 1 0 0
1 821 883 50 1 0 0
Polygon3D 0
PolygonOnTriangulations 0
Surfaces 6
1 821 803 0 1 0 0 0 0 1 0 -1 0
1 821 803 0 0 1 0 0 0 1 1 0 0
1 821 803 50 0 0 1 1 0 0 0 1 0
1 821 883 0 0 1 0 0 0 1 1 0 0
1 821 803 0 0 0 1 1 0 0 0 1 0
1 898 803 0 1 0 0 0 0 1 0 -1 0
Triangulations 0
TShapes 34
Ve
1e-007
821 803 50
0 0
0101100
*
Ve
1e-007
821 803 0
0 0
0101100
*
Ed
1e-007 1 1 0
1 1 0 0 50
2 1 1 0 0 50
2 2 2 0 0 50
0
0101000
-34 0 +33 0 *
Ve
1e-007
821 883 50
0 0
0101100
*
Ed
1e-007 1 1 0
1 2 0 0 80
2 3 1 0 0 80
2 4 3 0 0 80
0
0101000
-31 0 +34 0 *
Ve
1e-007
821 883 0
0 0
0101100
*
Ed
1e-007 1 1 0
1 3 0 0 50
2 5 1 0 0 50
2 6 4 0 0 50
0
0101000
-31 0 +29 0 *
Ed
1e-007 1 1 0
1 4 0 0 80
2 7 1 0 0 80
2 8 5 0 0 80
0
0101000
-29 0 +33 0 *
Wi
0101000
-32 0 -30 0 +28 0 +27 0 *
Fa
0 1e-007 1 0
0111000
+26 0 *
Ve
1e-007
898 803 50
0 0
0101100
*
Ve
1e-007
898 803 0
0 0
0101100
*
Ed
1e-007 1 1 0
1 5 0 0 50
2 9 6 0 0 50
2 10 2 0 0 50
0
0101000
-24 0 +23 0 *
Ve
1e-007
898 883 50
0 0
0101100
*
Ed
1e-007 1 1 0
1 6 0 0 80
2 11 6 0 0 80
2 12 3 0 0 80
0
0101000
-21 0 +24 0 *
Ve
1e-007
898 883 0
0 0
0101100
*
Ed
1e-007 1 1 0
1 7 0 0 50
2 13 6 0 0 50
2 14 4 0 0 50
0
0101000
-21 0 +19 0 *
Ed
1e-007 1 1 0
1 8 0 0 80
2 15 6 0 0 80
2 16 5 0 0 80
0
0101000
-19 0 +23 0 *
Wi
0101000
-22 0 -20 0 +18 0 +17 0 *
Fa
0 1e-007 6 0
0111000
+16 0 *
Ed
1e-007 1 1 0
1 9 0 0 77
2 17 2 0 0 77
2 18 5 0 0 77
0
0101000
-23 0 +33 0 *
Ed
1e-007 1 1 0
1 10 0 0 77
2 19 2 0 0 77
2 20 3 0 0 77
0
0101000
-24 0 +34 0 *
Wi
0101000
-14 0 -22 0 +13 0 +32 0 *
Fa
0 1e-007 2 0
0111000
+12 0 *
Ed
1e-007 1 1 0
1 11 0 0 77
2 21 4 0 0 77
2 22 5 0 0 77
0
0101000
-19 0 +29 0 *
Ed
1e-007 1 1 0
1 12 0 0 77
2 23 4 0 0 77
2 24 3 0 0 77
0
0101000
-21 0 +31 0 *
Wi
0101000
-10 0 -18 0 +9 0 +28 0 *
Fa
0 1e-007 4 0
0111000
+8 0 *
Wi
0101000
-27 0 -10 0 +17 0 +14 0 *
Fa
0 1e-007 5 0
0111000
+6 0 *
Wi
0101000
-30 0 -9 0 +20 0 +13 0 *
Fa
0 1e-007 3 0
0111000
+4 0 *
Sh
0101100
-25 0 +15 0 -11 0 +7 0 -5 0 +3 0 *
So
1100000
+2 0 *
+1 0

View File

@ -3401,6 +3401,15 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
(types(7).IsEqual(StepType(271)))) { (types(7).IsEqual(StepType(271)))) {
return 323; return 323;
} }
else if ((types(1).IsEqual(StepType(40))) &&
(types(2).IsEqual(StepType(41))) &&
(types(3).IsEqual(StepType(240))) &&
(types(4).IsEqual(StepType(49))) &&
(types(5).IsEqual(StepType(247))) &&
(types(6).IsEqual(StepType(144))) &&
(types(7).IsEqual(StepType(271)))) {
return 323;
}
} }
// Added by FMA // Added by FMA
else if (NbComp == 6) { else if (NbComp == 6) {
@ -3630,6 +3639,11 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
(types(3).IsEqual(StepType(336)))) { (types(3).IsEqual(StepType(336)))) {
return 335; return 335;
} }
else if ((types(1).IsEqual(StepType(169))) &&
(types(2).IsEqual(StepType(336))) &&
(types(3).IsEqual(StepType(264)))) {
return 335;
}
else if ((types(1).IsEqual(StepType(143))) && else if ((types(1).IsEqual(StepType(143))) &&
(types(2).IsEqual(StepType(188))) && (types(2).IsEqual(StepType(188))) &&
(types(3).IsEqual(StepType(246)))) { (types(3).IsEqual(StepType(246)))) {

View File

@ -19,22 +19,19 @@ set aFile ${imagedir}/${test_image}.pdf
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} PDF vexport ${aFile} PDF
if { [checkplatform -windows] } { set refsize_min 144000
set refsize 153993 set refsize_max 154000
} else {
set refsize 144401
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to PDF file was done" puts "Export to PDF format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to PDF file was done but size of file is incorrect"
puts "Error: Compare content of resulting PDF file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to PDF file was not done" puts "Error: Export to PDF format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -45,22 +45,19 @@ set aFile ${imagedir}/${test_image}.pdf
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} PDF vexport ${aFile} PDF
if { [checkplatform -windows] } { set refsize_min 9060
set refsize 9087 set refsize_max 9090
} else {
set refsize 9063
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to PDF file was done" puts "Export to PDF format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to PDF file was done but size of file is incorrect"
puts "Error: Compare content of resulting PDF file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to PDF file was not done" puts "Error: Export to PDF format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -45,22 +45,19 @@ set aFile ${imagedir}/${test_image}.ps
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} PS vexport ${aFile} PS
if { [checkplatform -windows] } { set refsize_min 9540
set refsize 9568 set refsize_max 9570
} else {
set refsize 9544
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to PS format was done" puts "Export to PS format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to PS file was done but size of file is incorrect"
puts "Error: Compare content of resulting PS file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to PS format was not done" puts "Error: Export to PS format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -44,22 +44,19 @@ set aFile ${imagedir}/${test_image}.eps
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} EPS vexport ${aFile} EPS
if { [checkplatform -windows] } { set refsize_min 9480
set refsize 9512 set refsize_max 9520
} else {
set refsize 9488
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to EPS file was done" puts "Export to EPS format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to EPS file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to EPS file was done but size of file is incorrect"
puts "Error: Compare content of resulting EPS file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to EPS file was not done" puts "Error: Export to EPS format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -47,12 +47,12 @@ vcaps -ffp 1
vexport ${aFile} TEX vexport ${aFile} TEX
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to TEX file was done" puts "Export to TEX file successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
puts "Size of TEX file = $filesize" puts "Size of TEX file = $filesize"
if { $filesize > 1500 } { if { $filesize > 1500 } {
puts "Faulty : Export to TEX file was done but size of file is incorrect" puts "Error : Export to TEX file succeeded but size of file is incorrect"
} }
} else { } else {
puts "Faulty : Export to TEX file was not done" puts "Error : Export to TEX file has failed"
} }

View File

@ -45,22 +45,19 @@ set aFile ${imagedir}/${test_image}.svg
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} SVG vexport ${aFile} SVG
if { [checkplatform -windows] } { set refsize_min 12110
set refsize 12127 set refsize_max 12130
} else {
set refsize 12113
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to SVG file was done" puts "Export to SVG format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to SVG file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to SVG file was done but size of file is incorrect"
puts "Error: Compare content of resulting SVG file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to SVG file was not done" puts "Error: Export to SVG format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -45,22 +45,19 @@ set aFile ${imagedir}/${test_image}.pgf
vcaps -ffp 1 vcaps -ffp 1
vexport ${aFile} PGF vexport ${aFile} PGF
if { [checkplatform -windows] } { set refsize_min 17790
set refsize 17918 set refsize_max 17920
} else {
set refsize 17794
}
if { [file exists ${aFile}] } { if { [file exists ${aFile}] } {
puts "Export to PGF file was done" puts "Export to PGF format successful"
set filesize [file size ${aFile}] set filesize [file size ${aFile}]
if { $filesize != $refsize } { if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PGF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)." puts "Error: Export to PGF file was done but size of file is incorrect"
puts "Error: Compare content of resulting PGF file with reference." puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize if it's necessary." puts "Error: Update refsize limits if necessary."
} }
} else { } else {
puts "Faulty : Export to PGF file was not done" puts "Error: Export to PGF format has failed"
} }
checkview -screenshot -3d -path ${imagedir}/${test_image}.png checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -14,10 +14,8 @@ vshowfaceboundary b 1 255 0 0 10 1
vfit vfit
vaspects -setwidth 5 vaspects -setwidth 5
if { "[vreadpixel 183 190 rgb name]" != "RED" if { "[vreadpixel 314 344 rgb name]" != "RED" ||
|| "[vreadpixel 314 344 rgb name]" != "RED" "[vreadpixel 26 267 rgb name]" != "RED" } {
|| "[vreadpixel 26 267 rgb name]" != "RED"
} {
puts "Error : Boundary of face is not changed" puts "Error : Boundary of face is not changed"
} }

View File

@ -1,51 +1,49 @@
puts "============" puts "============"
puts "CR26357" puts "0026357: Visualization - Panning zooms view if aspect ratio > 1"
puts "============" puts "============"
puts "" puts ""
#########################################################################
puts "Panning regression after fixing 0026082"
#########################################################################
box b 100 100 100 box b 100 100 100
vclear
vinit View1 w=400 h=400 vinit View1 w=400 h=400
vinit View2 w=200 h=400 vinit View2 w=200 h=400
vinit View3 w=400 h=200 vinit View3 w=400 h=200
vclear
vaxo
vdisplay b vdisplay -dispMode 1 -highMode 1 b
# Test panning with aspect ratio 1:1 # Test panning with aspect ratio 1:1
vactivate View1 vactivate View1
vaxo
vfit vfit
vpan 200 0 vpan 200 0
vmoveto 399 200 vmoveto 399 200
checkcolor 399 200 0 1 1 if { [vreadpixel 399 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View1" }
vpan -200 0 vpan -200 0
vmoveto 200 200 vmoveto 200 200
checkcolor 200 200 0 1 1 if { [vreadpixel 200 200 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View1" }
vdump ${imagedir}/${casename}_1.png vdump ${imagedir}/${casename}_1.png
# Test panning with aspect ratio 1:2 # Test panning with aspect ratio 1:2
vactivate View2 vactivate View2
vaxo
vfit vfit
vpan 100 0 vpan 100 0
vmoveto 199 100 vmoveto 199 100
checkcolor 199 100 0 1 1 if { [vreadpixel 199 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View2" }
vpan -100 0 vpan -100 0
vmoveto 100 100 vmoveto 100 100
checkcolor 100 100 0 1 1 if { [vreadpixel 100 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View2" }
vdump ${imagedir}/${casename}_2.png vdump ${imagedir}/${casename}_2.png
# Test panning with aspect ratio 2:1 # Test panning with aspect ratio 2:1
vactivate View3 vactivate View3
vaxo
vfit vfit
vpan 200 0 vpan 200 0
vmoveto 399 100 vmoveto 399 100
checkcolor 399 100 0 1 1 if { [vreadpixel 399 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after forward panning in View3" }
vpan -200 0 vpan -200 0
vmoveto 200 100 vmoveto 200 100
checkcolor 200 100 0 1 1 if { [vreadpixel 200 100 rgb name] != "DARKTURQUOISE" } { puts "Error: incorrect color after backward panning in View3" }
vdump ${imagedir}/${casename}_3.png vdump ${imagedir}/${casename}_3.png

View File

@ -5,9 +5,14 @@ puts ""
pload MODELING VISUALIZATION pload MODELING VISUALIZATION
box b 1 2 3 box b 1 2 3
# request software OpenGL implementation - which is OpenGL 1.1 in case of Windows # request software OpenGL implementation - which is OpenGL 1.1 in case of Windows
# (test case is useless for other systems) # (test case is useless for other systems)
vcaps -softMode 1 vcaps -softMode 1
# disable FPE signals -- these often occur in software OpenGL drivers
dsetsignal 0
vclear vclear
vinit View1 vinit View1
vsetdispmode 1 vsetdispmode 1