Skip to content

Commit

Permalink
0029196: Tests - some test cases fail with Intel HD graphics
Browse files Browse the repository at this point in the history
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
  • Loading branch information
a-betenev authored and bugmaster committed Oct 12, 2017
1 parent 9e47911 commit 7f83633
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 369 deletions.
282 changes: 0 additions & 282 deletions data/occ/Box.brep

This file was deleted.

14 changes: 14 additions & 0 deletions src/RWStepAP214/RWStepAP214_ReadWriteModule.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3401,6 +3401,15 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
(types(7).IsEqual(StepType(271)))) {
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
else if (NbComp == 6) {
Expand Down Expand Up @@ -3630,6 +3639,11 @@ Standard_Integer RWStepAP214_ReadWriteModule::CaseStep
(types(3).IsEqual(StepType(336)))) {
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))) &&
(types(2).IsEqual(StepType(188))) &&
(types(3).IsEqual(StepType(246)))) {
Expand Down
19 changes: 8 additions & 11 deletions tests/bugs/vis/bug21091_3
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,19 @@ set aFile ${imagedir}/${test_image}.pdf
vcaps -ffp 1
vexport ${aFile} PDF

if { [checkplatform -windows] } {
set refsize 153993
} else {
set refsize 144401
}
set refsize_min 144000
set refsize_max 154000

if { [file exists ${aFile}] } {
puts "Export to PDF file was done"
puts "Export to PDF format successful"
set filesize [file size ${aFile}]
if { $filesize != $refsize } {
puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
puts "Error: Compare content of resulting PDF file with reference."
puts "Error: Update refsize if it's necessary."
if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PDF file was done but size of file is incorrect"
puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize limits if necessary."
}
} 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
Expand Down
19 changes: 8 additions & 11 deletions tests/bugs/vis/bug21091_4
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,19 @@ set aFile ${imagedir}/${test_image}.pdf
vcaps -ffp 1
vexport ${aFile} PDF

if { [checkplatform -windows] } {
set refsize 9087
} else {
set refsize 9063
}
set refsize_min 9060
set refsize_max 9090

if { [file exists ${aFile}] } {
puts "Export to PDF file was done"
puts "Export to PDF format successful"
set filesize [file size ${aFile}]
if { $filesize != $refsize } {
puts "Error: Export to PDF file was done but size of file is incorrect (refsize = $refsize, current = $filesize)."
puts "Error: Compare content of resulting PDF file with reference."
puts "Error: Update refsize if it's necessary."
if { $filesize < $refsize_min || $filesize > $refsize_max } {
puts "Error: Export to PDF file was done but size of file is incorrect"
puts " (current = $filesize, expected to be in range \[$refsize_min, $refsize_max\])."
puts "Error: Update refsize limits if necessary."
}
} 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
Loading

0 comments on commit 7f83633

Please sign in to comment.