1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00

0029124: Visualization, Tests - failures when tests are executed via Remote Desktop connection

Protection against accessing null pointer is added in OpenGl_VertexBuffer::Create().
In command vreadpixel OpenGl-related warnings are redirected to cout so that they do not contaminate the command output.
Test grid caf presentation is configured to ignore OpenGl-related warning messages.
Tests in grid tools are configured to report status SKIPPED if tools are not available (OCCT is built without Qt).
This commit is contained in:
abv 2017-09-19 13:04:23 +03:00 committed by bugmaster
parent 151da08bbe
commit 68beaa3c57
5 changed files with 19 additions and 7 deletions

View File

@ -59,7 +59,7 @@ GLenum OpenGl_VertexBuffer::GetTarget() const
// =======================================================================
bool OpenGl_VertexBuffer::Create (const Handle(OpenGl_Context)& theGlCtx)
{
if (myBufferId == NO_BUFFER)
if (myBufferId == NO_BUFFER && theGlCtx->core15fwd != NULL)
{
theGlCtx->core15fwd->glGenBuffers (1, &myBufferId);
}

View File

@ -6022,6 +6022,16 @@ static int VReadPixel (Draw_Interpretor& theDI,
return 1;
}
// redirect possible warning messages that could have been added by ToPixMap
// into the Tcl interpretor (via DefaultMessenger) to cout, so that they do not
// contaminate result of the command
Standard_CString aWarnLog = theDI.Result();
if (aWarnLog != NULL && aWarnLog[0] != '\0')
{
std::cout << aWarnLog << std::endl;
}
theDI.Reset();
Quantity_ColorRGBA aColor = anImage.PixelColor (anX, anY);
if (toShowName)
{

View File

@ -43,27 +43,27 @@ vmoveto 0 0
vmoveto 0 0
if { [vreadpixel $x1 $y rgb name] != "IVORY" || [vreadpixel $x2 $y rgb name] != "IVORY" } {
Error: unexpected color of not selected object
puts "Error: unexpected color of not selected object"
}
vmoveto ${x1} ${y}
vmoveto ${x1} ${y}
if { [vreadpixel $x1 $y rgb name] != "WHITE" } {
Error: unexpected color of selected object
puts "Error: unexpected color of selected object"
}
if { [vreadpixel $x2 $y rgb name] != "IVORY" } {
Error: unexpected color of not selected object
puts "Error: unexpected color of not selected object"
}
vmoveto ${x2} ${y}
vmoveto ${x2} ${y}
if { [vreadpixel $x1 $y rgb name] != "IVORY" } {
Error: unexpected color of not selected object
puts "Error: unexpected color of not selected object"
}
if { [vreadpixel $x2 $y rgb name] != "WHITE" } {
Error: unexpected color of selected object
puts "Error: unexpected color of selected object"
}
checkview -screenshot -3d -path ${imagedir}/${test_image}.png

View File

@ -1,4 +1,5 @@
IGNORE /on screen buffer is used for image dump - content might be invalid/ reported when software Microsoft OpenGL driver is used (remote desktop)
IGNORE /^\s*DPrsStd_AISColor\s*:\s*Error\b/ ignore presentation K2 error message
FAILED /\binvalid\b/ error
FAILED /\bFailed\b/ error
FAILED /\bfailed\b/ error
IGNORE /^\s*DPrsStd_AISColor\s*:\s*Error\b/ ignore presentation K2 error message

View File

@ -1,2 +1,3 @@
SKIPPED /Draw_Failure: Could not open: TKToolsDraw/ OCCT built without Qt tools
FAILED /\bFaulty\b/ bad shape
OK /Relative error of mass computation/ message from vprops