diff --git a/dox/dev_guides/tests/tests.md b/dox/dev_guides/tests/tests.md index dc9ef55b75..e2410584fb 100644 --- a/dox/dev_guides/tests/tests.md +++ b/dox/dev_guides/tests/tests.md @@ -609,6 +609,8 @@ Draw[2]> checkplatform Windows ~~~~~ +Use procedure *checkdebugmode* to get the configuration. It returns 1 if current configuration is 'Debug', overwise returns 0. + * RegularExpression is a regular expression, which should be matched against the line indicating the problem in the script output. Example: diff --git a/src/Approx/Approx_SweepApproximation.cxx b/src/Approx/Approx_SweepApproximation.cxx index 590e713af0..a42ce27e62 100644 --- a/src/Approx/Approx_SweepApproximation.cxx +++ b/src/Approx/Approx_SweepApproximation.cxx @@ -730,10 +730,10 @@ Standard_Real Approx_SweepApproximation::TolCurveOnSurf(const Standard_Integer I { o << "Dump of SweepApproximation" << endl; if (done) { - o << "Error 3d = " << MaxErrorOnSurf() << endl; + o << "DEBUG: Error 3d = " << MaxErrorOnSurf() << endl; if (Num2DSS>0) { - o << "Error 2d = "; + o << "DEBUG: Error 2d = "; for (Standard_Integer ii=1; ii<=Num2DSS; ii++) { o << Max2dError(ii); if (ii < Num2DSS) o << " , " << endl; diff --git a/src/BRepCheck/BRepCheck_Wire.cxx b/src/BRepCheck/BRepCheck_Wire.cxx index 2f1e7a6a3c..0fd13f4dfa 100644 --- a/src/BRepCheck/BRepCheck_Wire.cxx +++ b/src/BRepCheck/BRepCheck_Wire.cxx @@ -382,7 +382,7 @@ Standard_Boolean IsDistanceIn3DTolerance (const gp_Pnt& thePnt_f, #ifdef OCCT_DEBUG cout << endl; cout << "--------Function IsDistanceIn3DTolerance(...)----------" << endl; - cout << "--- BRepCheck Wire: Closed3d -> Error" << endl; + cout << "DEBUG: --- BRepCheck Wire: Closed3d -> Error" << endl; cout << "--- Dist (" << Dist << ") > Tol3d (" << aTol3d << ")" << endl; cout << "Pnt1(" << thePnt_f.X() << "; " << thePnt_f.Y() << "; " << thePnt_f.Z() << ")" << endl; cout << "Pnt2(" << thePnt_l.X() << "; " << thePnt_l.Y() << "; " << thePnt_l.Z() << ")" << endl; diff --git a/src/DrawResources/CheckCommands.tcl b/src/DrawResources/CheckCommands.tcl index c6a06c8cf3..074d6d244c 100644 --- a/src/DrawResources/CheckCommands.tcl +++ b/src/DrawResources/CheckCommands.tcl @@ -43,9 +43,16 @@ proc checkcolor { coord_x coord_y rd_get gr_get bl_get } { set color "" catch { [set color "[vreadpixel ${coord_x} ${coord_y} rgb]"] } + if {"$color" == ""} { puts "Error : Pixel coordinates (${position_x}; ${position_y}) are out of view" } + + # Skip debug information if necessary + if {[llength $color] != 3} { + regexp {([0-9]+ [0-9]+ [0-9]+)} $color dump color + } + set rd [lindex $color 0] set gr [lindex $color 1] set bl [lindex $color 2] @@ -127,6 +134,12 @@ proc _checkpoint {coord_x coord_y rd_ch gr_ch bl_ch} { incr j continue } + + # Skip debug information if necessary + if {[llength $color] != 3} { + regexp {([0-9]+ [0-9]+ [0-9]+)} $color dump color + } + set rd [lindex $color 0] set gr [lindex $color 1] set bl [lindex $color 2] @@ -1085,3 +1098,17 @@ proc checkplatform {args} { # current platform is not equal to given as argument platform, return false return 0 } + +help checkdebugmode { + return 1 if current configuration is 'Debug', overwise return 0 + + Use: checkdebugmode +} +proc checkdebugmode {} { + catch {set dversion_log [dversion]} + if { [regexp {Debug mode} ${dversion_log}] || [regexp {Extended debug mode} ${dversion_log}]} { + return 1 + } else { + return 0 + } +} diff --git a/src/GeomPlate/GeomPlate_MakeApprox.cxx b/src/GeomPlate/GeomPlate_MakeApprox.cxx index dc53d80cf4..05a0b98bbc 100644 --- a/src/GeomPlate/GeomPlate_MakeApprox.cxx +++ b/src/GeomPlate/GeomPlate_MakeApprox.cxx @@ -297,8 +297,8 @@ GeomPlate_MakeApprox::GeomPlate_MakeApprox(const Handle(GeomPlate_Surface)& Surf myCritError = AppPlate.CritError(3,1); #ifdef OCCT_DEBUG cout<<"Approximation results"<Find(NAUO); if ( binder.IsNull() || ! binder->HasResult() ) { #ifdef OCCT_DEBUG - cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl; + cout << "DEBUG: Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl; #endif return L; } @@ -1103,7 +1103,7 @@ TDF_Label STEPCAFControl_Reader::FindInstance (const Handle(StepRepr_NextAssembl TopoDS_Shape S = TransferBRep::ShapeResult ( TP, binder ); if ( S.IsNull() ) { #ifdef OCCT_DEBUG - cout << "Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl; + cout << "DEBUG: Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape" << endl; #endif return L; } diff --git a/src/STEPConstruct/STEPConstruct_Styles.cxx b/src/STEPConstruct/STEPConstruct_Styles.cxx index ad131f96c0..930d23a44b 100644 --- a/src/STEPConstruct/STEPConstruct_Styles.cxx +++ b/src/STEPConstruct/STEPConstruct_Styles.cxx @@ -725,7 +725,7 @@ Standard_Boolean STEPConstruct_Styles::DecodeColor (const Handle(StepVisual_Colo else if ( name.IsEqual ( "white" ) ) Col.SetValues ( Quantity_NOC_WHITE ); else { #ifdef OCCT_DEBUG - cout << "Error: color name \"" << name << "\" is not recognized" << endl; + cout << "DEBUG: Error: color name \"" << name << "\" is not recognized" << endl; #endif return Standard_False; } diff --git a/src/ShapeConstruct/ShapeConstruct.cxx b/src/ShapeConstruct/ShapeConstruct.cxx index b8b6b1f6eb..a14a4bd1f4 100644 --- a/src/ShapeConstruct/ShapeConstruct.cxx +++ b/src/ShapeConstruct/ShapeConstruct.cxx @@ -240,7 +240,7 @@ Handle(Geom_BSplineSurface) ShapeConstruct::ConvertSurfaceToBSpline(const Handle #ifdef OCCT_DEBUG Standard_Integer nbOfSpan = (anApprox.Surface()->NbUKnots()-1)*(anApprox.Surface()->NbVKnots()-1); - cout << "\terror = " << anApprox.MaxError() << "\tspans = " << nbOfSpan << endl; + cout << "DEBUG:\terror = " << anApprox.MaxError() << "\tspans = " << nbOfSpan << endl; cout << " Surface is aproximated with continuity " << (GeomAbs_Shape)cnt <0 ) { #ifdef OCCT_DEBUG - cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl; + cout << "DEBUG: Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl; #endif for ( Standard_Integer j=1; j <= loops.Length(); j++ ) { roots.Append ( loops(j) ); @@ -2542,7 +2542,7 @@ void ShapeFix_ComposeShell::MakeFacesOnPatch (TopTools_SequenceOfShape &faces, // check for lost wires, and if they are, make them roots if ( i == roots.Length() && loops.Length() >0 ) { #ifdef OCCT_DEBUG - cout << "Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl; + cout << "DEBUG: Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can't dispatch wires" << endl; #endif for ( j=1; j <= loops.Length(); j++ ) { TopoDS_Shape aSh = loops(j); diff --git a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx index 8488355d9d..8e6b9d09ff 100644 --- a/src/ShapeFix/ShapeFix_EdgeProjAux.cxx +++ b/src/ShapeFix/ShapeFix_EdgeProjAux.cxx @@ -587,7 +587,7 @@ void ShapeFix_EdgeProjAux::UpdateParam2d (const Handle(Geom2d_Curve)& theCurve2d else if ( Abs ( myLastParam - cf ) <= preci2d ) myLastParam = cl; else { #ifdef OCCT_DEBUG - cout << "Error : curve 2d range crossing non periodic curve origin"; + cout << "DEBUG: Error : curve 2d range crossing non periodic curve origin"; cout << endl; #endif // add fail result; diff --git a/src/ShapeFix/ShapeFix_WireSegment.cxx b/src/ShapeFix/ShapeFix_WireSegment.cxx index cca114edc3..439de1c682 100644 --- a/src/ShapeFix/ShapeFix_WireSegment.cxx +++ b/src/ShapeFix/ShapeFix_WireSegment.cxx @@ -243,7 +243,7 @@ void ShapeFix_WireSegment::DefineIUMin (const Standard_Integer i, if ( myIUMin->Value(i) < iumin ) myIUMin->SetValue ( i, iumin ); #ifdef OCCT_DEBUG if ( myIUMin->Value(i) > myIUMax->Value(i) ) - cout << "Warning: ShapeFix_WireSegment::DefineIUMin: indexation error" << endl; + cout << "DEBUG: Warning: ShapeFix_WireSegment::DefineIUMin: indexation error" << endl; #endif } @@ -259,7 +259,7 @@ void ShapeFix_WireSegment::DefineIUMax (const Standard_Integer i, #ifdef OCCT_DEBUG Standard_Integer iun = myIUMin->Value(i), iux = myIUMax->Value(i); if ( iun > iux ) - cout << "Warning: ShapeFix_WireSegment::DefineIUMax: indexation error" << endl; + cout << "DEBUG: Warning: ShapeFix_WireSegment::DefineIUMax: indexation error" << endl; #endif } @@ -275,7 +275,7 @@ void ShapeFix_WireSegment::DefineIVMin (const Standard_Integer i, #ifdef OCCT_DEBUG Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i); if ( ivn > ivx ) - cout << "Warning: ShapeFix_WireSegment::DefineIVMin: indexation error" << endl; + cout << "DEBUG: Warning: ShapeFix_WireSegment::DefineIVMin: indexation error" << endl; #endif } @@ -291,7 +291,7 @@ void ShapeFix_WireSegment::DefineIVMax (const Standard_Integer i, #ifdef OCCT_DEBUG Standard_Integer ivn = myIVMin->Value(i), ivx = myIVMax->Value(i); if ( ivn > ivx ) - cout << "Warning: ShapeFix_WireSegment::DefineIVMax: indexation error" << endl; + cout << "DEBUG: Warning: ShapeFix_WireSegment::DefineIVMax: indexation error" << endl; #endif } @@ -324,7 +324,7 @@ Standard_Boolean ShapeFix_WireSegment::CheckPatchIndex (const Standard_Integer i Standard_Boolean ok = ( dU ==0 || dU ==1 ) && ( dV ==0 || dV ==1 ); #ifdef OCCT_DEBUG if ( ! ok ) - cout << "Warning: ShapeFix_WireSegment::CheckPatchIndex: incomplete indexation" << endl; + cout << "DEBUG: Warning: ShapeFix_WireSegment::CheckPatchIndex: incomplete indexation" << endl; #endif return ok; } diff --git a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx index 518f0e9752..3f45523b8d 100644 --- a/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx +++ b/src/ShapeUpgrade/ShapeUpgrade_WireDivide.cxx @@ -460,7 +460,7 @@ void ShapeUpgrade_WireDivide::Perform () Standard_Integer nbc2d = theSegments2d->Length(); if (nbc!=nbc2d) { #ifdef OCCT_DEBUG - cout<<"Error: Number of intervals are not equal for 2d 3d. Ignored."< " << num*100/NbRecords() << " % in File) ***"; if (prev > 0) sout << " Ident #" << theidents(prev); sout << "\n" << errm << endl; diff --git a/src/StepFile/StepFile_Read.cxx b/src/StepFile/StepFile_Read.cxx index 9ce43273dc..cf2adc6cfc 100644 --- a/src/StepFile/StepFile_Read.cxx +++ b/src/StepFile/StepFile_Read.cxx @@ -232,7 +232,7 @@ void StepFile_Interrupt (char* mess) { #ifdef OCCT_DEBUG Handle(Message_Messenger) sout = Message::DefaultMessenger(); - sout << " **** StepFile Error : " << mess << " ****" << endl; + sout << "DEBUG: **** StepFile Error : " << mess << " ****" << endl; #endif checkread->AddFail(mess); } diff --git a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx index 38f7f94d23..ad105a2f5b 100644 --- a/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx +++ b/src/TopoDSToStep/TopoDSToStep_MakeStepFace.cxx @@ -271,7 +271,7 @@ void TopoDSToStep_MakeStepFace::Init(const TopoDS_Face& aFace, if (MkWire.IsDone()) Loop = Handle(StepShape_Loop)::DownCast(MkWire.Value()); else { #ifdef OCCT_DEBUG - cout << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << endl; + cout << "DEBUG: " << TopoDSToStep::DecodeWireError(MkWire.Error())->String() << endl; #endif FP->AddWarning(errShape, " a Wire not mapped"); continue; diff --git a/tests/3rdparty/export/begin b/tests/3rdparty/export/begin index 3d4929419a..6673432817 100644 --- a/tests/3rdparty/export/begin +++ b/tests/3rdparty/export/begin @@ -1,6 +1,6 @@ # On Windows with VC, in typical configuration gl2ps is built with Release # mode only which will fail in Debug -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { puts "TODO ?#23540 windows: Error: export of image.*failed" puts "TODO ?#23540 windows: Error: The file has been exported.*different size \[(\]0 " } diff --git a/tests/blend/parse.rules b/tests/blend/parse.rules index bca616b06f..f8b7502b92 100644 --- a/tests/blend/parse.rules +++ b/tests/blend/parse.rules @@ -1,3 +1,6 @@ FAILED /\bFaulty\b/ bad shape IGNORE /^Tcl Exception: tolerance ang : [\d.-]+/ blend failure - test will be failed as incomplete -OK /Relative error of mass computation/ message from vprops \ No newline at end of file +OK /Relative error of mass computation/ message from vprops +IGNORE /DEBUG: Approximation error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Criterium error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error [23]d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/boolean/bsection/N5 b/tests/boolean/bsection/N5 index 1f9b5ea41e..98414084e2 100644 --- a/tests/boolean/bsection/N5 +++ b/tests/boolean/bsection/N5 @@ -1,4 +1,4 @@ -cpulimit 1000 +cpulimit 2000 restore [locate_data_file lh3d_px2.brep] a set i 1 diff --git a/tests/boolean/gdml_private/ZG4 b/tests/boolean/gdml_private/ZG4 index 095c42060d..929608dd24 100644 --- a/tests/boolean/gdml_private/ZG4 +++ b/tests/boolean/gdml_private/ZG4 @@ -1,2 +1,5 @@ +if { [checkdebugmode] } { + cpulimit 600 +} source [locate_data_file 51356_vase_creux.prt.3.gdml.tcl] diff --git a/tests/boolean/gdml_private/ZK3 b/tests/boolean/gdml_private/ZK3 index 9ef8ed47af..378d3ec833 100644 --- a/tests/boolean/gdml_private/ZK3 +++ b/tests/boolean/gdml_private/ZK3 @@ -1,2 +1,5 @@ +if { [checkdebugmode] } { + cpulimit 1200 +} source [locate_data_file voile_3.asm.1.gdml.tcl] diff --git a/tests/bugs/begin b/tests/bugs/begin index 5427240b8a..98da719fe6 100755 --- a/tests/bugs/begin +++ b/tests/bugs/begin @@ -14,9 +14,12 @@ set max_rel_tol_diff 0 # On Windows with VC, in typical configuration gl2ps is built with Release # mode only which will fail in Debug mode; add TODO for that case in order # to handle it once for all tests that can use vexport command -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { puts "TODO ?#23540 windows: Error: export of image.*failed" puts "TODO ?#23540 windows: Error: The file has been exported.*different size \[(\]0 " + puts "TODO ?#23540 windows: Error: Export to .+ file was done but size of file is incorrect" + puts "TODO ?#23540 windows: Error: Compare content of resulting .+ file with reference" + puts "TODO ?#23540 windows: Error: Update refsize if it's necessary" } if { [info exists imagedir] == 0 } { diff --git a/tests/bugs/fclasses/bug26922 b/tests/bugs/fclasses/bug26922 index 362712f3da..4608185e89 100755 --- a/tests/bugs/fclasses/bug26922 +++ b/tests/bugs/fclasses/bug26922 @@ -8,14 +8,14 @@ puts "" pload XDE -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 0.5 +if { [checkdebugmode] } { + if { [checkplatform -windows] } { + set max_time 1 } else { - set max_time 0.5 + set max_time 1 } } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_time 0.5 } else { set max_time 0.5 diff --git a/tests/bugs/fclasses/bug27114 b/tests/bugs/fclasses/bug27114 index 0e9e166524..ae7b558545 100644 --- a/tests/bugs/fclasses/bug27114 +++ b/tests/bugs/fclasses/bug27114 @@ -11,8 +11,11 @@ restore [locate_data_file bug27114.brep] aShape explode aShape set anInfo [distmini d aShape_1 aShape_2] +set solutions {} +regexp {d_val (.+)\nOutput} $anInfo dump solutions + # Check number of solutions -if { [llength $anInfo] != 9 } { +if { [llength ${solutions}] != 2 } { puts "ERROR: Incorrect number of solutions" } else { puts "OK: Two solutions is found" diff --git a/tests/bugs/mesh/bug25364 b/tests/bugs/mesh/bug25364 index 0ef6bc404e..a42246622d 100755 --- a/tests/bugs/mesh/bug25364 +++ b/tests/bugs/mesh/bug25364 @@ -72,7 +72,7 @@ set mem_delta_wsetpeak 220 set mem_delta_virt 220 set mem_delta_heap 80 -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set mem_delta_swap 220 set mem_delta_swappeak 350 set mem_delta_wsetpeak 320 diff --git a/tests/bugs/mesh/bug25378_1_1 b/tests/bugs/mesh/bug25378_1_1 index 6036829a96..9410bb23e3 100755 --- a/tests/bugs/mesh/bug25378_1_1 +++ b/tests/bugs/mesh/bug25378_1_1 @@ -20,10 +20,10 @@ set t_1 [expr [lindex [time {incmesh b 0.1}] 0]/1000000] puts "t_1=${t_1}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_1 20 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_1 0 } else { set max_t_1 0 diff --git a/tests/bugs/mesh/bug25378_1_2 b/tests/bugs/mesh/bug25378_1_2 index 696e3a7f4b..7c96baa3ed 100755 --- a/tests/bugs/mesh/bug25378_1_2 +++ b/tests/bugs/mesh/bug25378_1_2 @@ -20,7 +20,7 @@ set t_01 [expr [lindex [time {incmesh b 0.01}] 0]/1000000] puts "t_01=${t_01}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_01 180 } else { set max_t_01 1 diff --git a/tests/bugs/mesh/bug25378_1_3 b/tests/bugs/mesh/bug25378_1_3 index fb834de728..8dd22826fe 100755 --- a/tests/bugs/mesh/bug25378_1_3 +++ b/tests/bugs/mesh/bug25378_1_3 @@ -20,11 +20,11 @@ set t_001 [expr [lindex [time {incmesh b 0.001}] 0]/1000000] puts "t_001=${t_001}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { cpulimit 2000 set max_t_001 600 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_001 189 } else { set max_t_001 182 diff --git a/tests/bugs/mesh/bug25378_2_1 b/tests/bugs/mesh/bug25378_2_1 index d5c9aac8dd..4e47c4444a 100644 --- a/tests/bugs/mesh/bug25378_2_1 +++ b/tests/bugs/mesh/bug25378_2_1 @@ -14,10 +14,10 @@ set t_1 [expr [lindex [time {incmesh b 0.1 -min 0.5}] 0]/1000000] puts "t_1=${t_1}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_1 5 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_1 1 } else { set max_t_1 1 diff --git a/tests/bugs/mesh/bug25378_2_2 b/tests/bugs/mesh/bug25378_2_2 index 591d74f21f..5aaad53d95 100644 --- a/tests/bugs/mesh/bug25378_2_2 +++ b/tests/bugs/mesh/bug25378_2_2 @@ -14,10 +14,10 @@ set t_01 [expr [lindex [time {incmesh b 0.01 -min 0.1}] 0]/1000000] puts "t_01=${t_01}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode]} { set max_t_01 30 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_01 10 } else { set max_t_01 25 diff --git a/tests/bugs/mesh/bug25378_2_3 b/tests/bugs/mesh/bug25378_2_3 index 217e016539..1c6fa657e0 100644 --- a/tests/bugs/mesh/bug25378_2_3 +++ b/tests/bugs/mesh/bug25378_2_3 @@ -14,10 +14,10 @@ set t_001 [expr [lindex [time {incmesh b 0.001 -min 1}] 0]/1000000] puts "t_001=${t_001}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_001 30 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_001 10 } else { set max_t_001 15 diff --git a/tests/bugs/mesh/bug25378_3_1 b/tests/bugs/mesh/bug25378_3_1 index e21bea0f83..caf6fb8430 100644 --- a/tests/bugs/mesh/bug25378_3_1 +++ b/tests/bugs/mesh/bug25378_3_1 @@ -14,10 +14,10 @@ set t_1 [expr [lindex [time {incmesh b 0.1}] 0]/1000000] puts "t_1=${t_1}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_1 3 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_1 1 } else { set max_t_1 1 diff --git a/tests/bugs/mesh/bug25378_3_2 b/tests/bugs/mesh/bug25378_3_2 index b623c79189..4830ebb291 100644 --- a/tests/bugs/mesh/bug25378_3_2 +++ b/tests/bugs/mesh/bug25378_3_2 @@ -14,10 +14,10 @@ set t_01 [expr [lindex [time {incmesh b 0.01}] 0]/1000000] puts "t_01=${t_01}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode]} { set max_t_01 3 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_01 1 } else { set max_t_01 4 diff --git a/tests/bugs/mesh/bug25378_3_3 b/tests/bugs/mesh/bug25378_3_3 index 45489a7f7c..76bd657833 100644 --- a/tests/bugs/mesh/bug25378_3_3 +++ b/tests/bugs/mesh/bug25378_3_3 @@ -14,10 +14,10 @@ set t_001 [expr [lindex [time {incmesh b 0.001}] 0]/1000000] puts "t_001=${t_001}" trinfo b -if { [regexp {Debug mode} [dversion]] } { - set max_t_001 50 +if { [checkdebugmode] } { + set max_t_001 120 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_001 30 } else { set max_t_001 55 diff --git a/tests/bugs/mesh/bug25378_4_1 b/tests/bugs/mesh/bug25378_4_1 index 3c46a29f0e..3607968bf5 100644 --- a/tests/bugs/mesh/bug25378_4_1 +++ b/tests/bugs/mesh/bug25378_4_1 @@ -14,10 +14,10 @@ set t_1 [expr [lindex [time {incmesh b 0.1 -min 0.5}] 0]/1000000] puts "t_1=${t_1}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_1 5 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_1 2 } else { set max_t_1 2 diff --git a/tests/bugs/mesh/bug25378_4_2 b/tests/bugs/mesh/bug25378_4_2 index 523347f4ab..7e38c746a6 100644 --- a/tests/bugs/mesh/bug25378_4_2 +++ b/tests/bugs/mesh/bug25378_4_2 @@ -14,10 +14,10 @@ set t_01 [expr [lindex [time {incmesh b 0.01 -min 0.1}] 0]/1000000] puts "t_01=${t_01}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode]} { set max_t_01 5 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_01 2 } else { set max_t_01 2 diff --git a/tests/bugs/mesh/bug25378_4_3 b/tests/bugs/mesh/bug25378_4_3 index 5d91afe1f5..e53f2287aa 100644 --- a/tests/bugs/mesh/bug25378_4_3 +++ b/tests/bugs/mesh/bug25378_4_3 @@ -14,10 +14,10 @@ set t_001 [expr [lindex [time {incmesh b 0.001 -min 1}] 0]/1000000] puts "t_001=${t_001}" trinfo b -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_t_001 5 } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_t_001 2 } else { set max_t_001 2 diff --git a/tests/bugs/modalg_5/bug24157_1 b/tests/bugs/modalg_5/bug24157_1 index ee09a4f9bf..af888f04e9 100644 --- a/tests/bugs/modalg_5/bug24157_1 +++ b/tests/bugs/modalg_5/bug24157_1 @@ -17,7 +17,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode]} { set check_time 150 } else { set check_time 87 diff --git a/tests/bugs/modalg_5/bug24157_10 b/tests/bugs/modalg_5/bug24157_10 index cec4b7fb61..533ec204a0 100644 --- a/tests/bugs/modalg_5/bug24157_10 +++ b/tests/bugs/modalg_5/bug24157_10 @@ -82,7 +82,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 20 } else { set check_time 5 diff --git a/tests/bugs/modalg_5/bug24157_2 b/tests/bugs/modalg_5/bug24157_2 index 8e695a2a87..bb49a28e5f 100644 --- a/tests/bugs/modalg_5/bug24157_2 +++ b/tests/bugs/modalg_5/bug24157_2 @@ -20,7 +20,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 2500 } else { set check_time 378 diff --git a/tests/bugs/modalg_5/bug24157_3 b/tests/bugs/modalg_5/bug24157_3 index ed1f78ef11..5d0fe9c5aa 100644 --- a/tests/bugs/modalg_5/bug24157_3 +++ b/tests/bugs/modalg_5/bug24157_3 @@ -14,7 +14,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 50 } else { set check_time 16 diff --git a/tests/bugs/modalg_5/bug24157_4 b/tests/bugs/modalg_5/bug24157_4 index 1f3474e028..72b51b9070 100644 --- a/tests/bugs/modalg_5/bug24157_4 +++ b/tests/bugs/modalg_5/bug24157_4 @@ -59,7 +59,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 60 } else { set check_time 43 diff --git a/tests/bugs/modalg_5/bug24157_5 b/tests/bugs/modalg_5/bug24157_5 index 635573b917..6eea4b96ab 100644 --- a/tests/bugs/modalg_5/bug24157_5 +++ b/tests/bugs/modalg_5/bug24157_5 @@ -65,7 +65,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 50 } else { set check_time 20 diff --git a/tests/bugs/modalg_5/bug24157_6 b/tests/bugs/modalg_5/bug24157_6 index c715625cf0..d74af034d1 100644 --- a/tests/bugs/modalg_5/bug24157_6 +++ b/tests/bugs/modalg_5/bug24157_6 @@ -43,7 +43,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 40 } else { set check_time 24 diff --git a/tests/bugs/modalg_5/bug24157_7 b/tests/bugs/modalg_5/bug24157_7 index f7bebe4d7b..8ea877142b 100644 --- a/tests/bugs/modalg_5/bug24157_7 +++ b/tests/bugs/modalg_5/bug24157_7 @@ -43,7 +43,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 200 } else { set check_time 135 diff --git a/tests/bugs/modalg_5/bug24157_8 b/tests/bugs/modalg_5/bug24157_8 index 3d6848ee03..8bd5162079 100644 --- a/tests/bugs/modalg_5/bug24157_8 +++ b/tests/bugs/modalg_5/bug24157_8 @@ -44,7 +44,7 @@ bfillds -t regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 100 } else { set check_time 15 diff --git a/tests/bugs/modalg_5/bug24157_9 b/tests/bugs/modalg_5/bug24157_9 index 538bf2f00f..ed7a8a2e6c 100644 --- a/tests/bugs/modalg_5/bug24157_9 +++ b/tests/bugs/modalg_5/bug24157_9 @@ -24,7 +24,7 @@ bfillds regexp { +Tps: +([-0-9.+eE]+)} [bbuild result -t] full tps_time -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set check_time 280 } else { set check_time 100 diff --git a/tests/bugs/modalg_5/bug24758_2 b/tests/bugs/modalg_5/bug24758_2 index 64e5d8cd2c..69e8bd2ead 100644 --- a/tests/bugs/modalg_5/bug24758_2 +++ b/tests/bugs/modalg_5/bug24758_2 @@ -6,7 +6,7 @@ puts "" # Sample Draw scripts for demonstrating sweeping algorithm ############################################################## -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { cpulimit 3000 } diff --git a/tests/bugs/modalg_6/bug26567 b/tests/bugs/modalg_6/bug26567 index 9e6e567589..de39c01ac5 100644 --- a/tests/bugs/modalg_6/bug26567 +++ b/tests/bugs/modalg_6/bug26567 @@ -6,8 +6,11 @@ puts "" ## Exception in Boolean intersection command ############################### -cpulimit 1000 - +if { [checkdebugmode] } { + cpulimit 2400 +} else { + cpulimit 1000 +} restore [locate_data_file Bug26567_c0.brep] b1 restore [locate_data_file Bug26567_c1.brep] b2 restore [locate_data_file Bug26567_c2.brep] b3 diff --git a/tests/bugs/modalg_6/bug27021 b/tests/bugs/modalg_6/bug27021 index 082a33dc76..026ce1454e 100644 --- a/tests/bugs/modalg_6/bug27021 +++ b/tests/bugs/modalg_6/bug27021 @@ -8,16 +8,16 @@ puts "" pload QAcommands -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { - set max_time 8. - set max_time2 5. +if { [checkdebugmode] } { + if { [checkplatform -windows] } { + set max_time 180. + set max_time2 120. } else { set max_time 8. set max_time2 5. } } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_time 8. set max_time2 5. } else { @@ -41,7 +41,7 @@ if { ${A_sec} > ${max_time} } { } if { ${B_sec} > ${max_time2} } { - puts "Retrieving 100000000 vertices using approach A) is more than ${max_time2} seconds - Faulty" + puts "Retrieving 100000000 vertices using approach B) is more than ${max_time2} seconds - Faulty" } else { - puts "Retrieving 100000000 vertices using approach A) is less than ${max_time2} seconds - OK" + puts "Retrieving 100000000 vertices using approach B) is less than ${max_time2} seconds - OK" } diff --git a/tests/bugs/modalg_6/bug27033 b/tests/bugs/modalg_6/bug27033 index c2d05b2822..ae1d085da1 100644 --- a/tests/bugs/modalg_6/bug27033 +++ b/tests/bugs/modalg_6/bug27033 @@ -5,7 +5,9 @@ puts "" ############################################################# # Modeling -- ensure stable result of area calculation ############################################################# - +if { [checkdebugmode] } { + cpulimit 2400 +} pload XDE stepread [locate_data_file OCC11856.stp] a * diff --git a/tests/bugs/moddata_1/bug152_1 b/tests/bugs/moddata_1/bug152_1 index d42fb21e9a..1ced1102ca 100755 --- a/tests/bugs/moddata_1/bug152_1 +++ b/tests/bugs/moddata_1/bug152_1 @@ -1,9 +1,5 @@ puts "TODO OCC22033 ALL: Error : The area of result shape is" puts "TODO OCC22033 ALL: Faulty shapes in variables faulty_1 to faulty_" -if { [regexp {Debug mode} [dversion]] } { - puts "TODO OCC22033 ALL: TEST INCOMPLETE" - puts "TODO OCC22033 ALL: Exception" -} puts "================" puts "OCC152" diff --git a/tests/bugs/moddata_1/bug152_2 b/tests/bugs/moddata_1/bug152_2 index cecc8a21bb..23d3339f3a 100755 --- a/tests/bugs/moddata_1/bug152_2 +++ b/tests/bugs/moddata_1/bug152_2 @@ -1,8 +1,4 @@ puts "TODO OCC22033 ALL: Faulty shapes in variables faulty_1 to faulty_" -if { [regexp {Debug mode} [dversion]] } { - puts "TODO OCC22033 ALL: TEST INCOMPLETE" - puts "TODO OCC22033 ALL: Exception" -} puts "================" puts "OCC152" diff --git a/tests/bugs/moddata_3/bug25179 b/tests/bugs/moddata_3/bug25179 index b8aff0be96..26571ae923 100755 --- a/tests/bugs/moddata_3/bug25179 +++ b/tests/bugs/moddata_3/bug25179 @@ -6,7 +6,7 @@ puts "" # BRepMesh cannot build a mesh on specific geometry ################################################################################### -cpulimit 2000 +cpulimit 3600 restore [locate_data_file bug25179_nurbs-with-partial-seam.brep] result diff --git a/tests/bugs/moddata_3/bug27565 b/tests/bugs/moddata_3/bug27565 index 84486ea763..81c74a261c 100644 --- a/tests/bugs/moddata_3/bug27565 +++ b/tests/bugs/moddata_3/bug27565 @@ -11,7 +11,10 @@ explode a # Test number of solutions in a result. set info [distmini d a_1 a_2 1.0] -if { [llength $info] != 9 } { +regexp {d_val (.+)\nOutput} $info dump solutions + +if { ![info exists solutions] || + [llength ${solutions}] != 2 } { puts "Error : Extrema is wrong" } else { puts "OK: Extrema is valid" diff --git a/tests/bugs/moddata_3/bug28182 b/tests/bugs/moddata_3/bug28182 index d4df323a49..9edeefe32d 100644 --- a/tests/bugs/moddata_3/bug28182 +++ b/tests/bugs/moddata_3/bug28182 @@ -18,7 +18,7 @@ set defl 0.0001 set res [distmini r s_198 b $defl] -set redges [lrange [lindex [split $res \n] 1] 1 end] +regexp {r_val (.+)\nOutput} $res dump redges set nbsol [llength $redges] set dist [dval r_val] diff --git a/tests/bugs/moddata_3/bug28183 b/tests/bugs/moddata_3/bug28183 index ecaace3f4b..9b02442603 100644 --- a/tests/bugs/moddata_3/bug28183 +++ b/tests/bugs/moddata_3/bug28183 @@ -18,7 +18,7 @@ set ref_dist 1e-7 # find extremum points set res [distmini r s_511 b_2] -set redges [lrange [lindex [split $res \n] 1] 1 end] +regexp {r_val (.+)\nOutput} $res dump redges set nbsol [llength $redges] set dist [dval r_val] diff --git a/tests/bugs/parse.rules b/tests/bugs/parse.rules index 9d0907f3c0..0f450ee86a 100755 --- a/tests/bugs/parse.rules +++ b/tests/bugs/parse.rules @@ -2,3 +2,12 @@ FAILED /\bFaulty\b/ bad shape FAILED /failure reading attribute/ attribute failure SKIPPED /Error: unsupported locale specification/ locale is unavailable on tested system OK /Relative error of mass computation/ message from vprops +IGNORE /DEBUG: [*]+\s+Error on Record [0-9]+ \(on [0-9]+ -> [0-9]+ % in File\)\s+[*]+\s+Ident .[0-9]+/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: [*]+\s+StepFile Error : At line [0-9]+, syntax error\s+[*]+/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: --- BRepCheck Wire: Closed3d -> Error/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Approximation error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Criterium error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error [23]d =/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Other Error in Make STEP wire/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: ShapeProcess_Performer::Perform: sequence not defined for Seq/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: iteration = [0-9.e+-]+\terror = [0-9.e+-]+\tspans = [0-9.e+-]+/ extended messages of OCCT algorithms only for Debug configuration diff --git a/tests/bugs/step/bug2368 b/tests/bugs/step/bug2368 index 8238037a77..2c87f2034e 100644 --- a/tests/bugs/step/bug2368 +++ b/tests/bugs/step/bug2368 @@ -6,10 +6,4 @@ puts "" # Exeption is raised in the application during reading attached IGES file. ###################################################### -set list [stepread [locate_data_file OCC2368.stp] a *] -if {[lsearch ${list} Error] > -1} { - puts "OCC2368: Error during reading attached IGES file" -} else { - puts "OCC2368: OK" -} - +stepread [locate_data_file OCC2368.stp] a * diff --git a/tests/bugs/vis/bug26139 b/tests/bugs/vis/bug26139 index 6a9ac7defd..e7718614ca 100644 --- a/tests/bugs/vis/bug26139 +++ b/tests/bugs/vis/bug26139 @@ -11,5 +11,9 @@ puts "AIS_InteractiveContext::Display performance regression" pload VISUALIZATION pload QAcommands +if { [checkdebugmode] } { + cpulimit 3000 +} + vinit View1 OCC26139 diff --git a/tests/bugs/vis/bug26199 b/tests/bugs/vis/bug26199 index 54eab94495..d67d7739be 100644 --- a/tests/bugs/vis/bug26199 +++ b/tests/bugs/vis/bug26199 @@ -39,8 +39,8 @@ puts "vclear done in $d2 microseconds!\n" set t1_sec [expr $d1 * 1.e-6] set t2_sec [expr $d2 * 1.e-6] -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { +if { [checkdebugmode] } { + if { [checkplatform -windows] } { set max_time_vconnectto 5 set max_time_vclear 5 } else { @@ -48,7 +48,7 @@ if { [regexp {Debug mode} [dversion]] } { set max_time_vclear 5 } } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_time_vconnectto 1 set max_time_vclear 1 } else { diff --git a/tests/chamfer/parse.rules b/tests/chamfer/parse.rules index 610d206403..d571114d1f 100644 --- a/tests/chamfer/parse.rules +++ b/tests/chamfer/parse.rules @@ -1 +1,4 @@ FAILED /\bFaulty\b/ bad shape +IGNORE /DEBUG: Approximation error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Criterium error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error [23]d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/de/begin b/tests/de/begin index 20204e3741..6bdbef3d17 100644 --- a/tests/de/begin +++ b/tests/de/begin @@ -2,7 +2,11 @@ pload DCAF pload TOPTEST pload XDE -cpulimit 2500 +if {[checkdebugmode]} { + cpulimit 5000 +} else { + cpulimit 2500 +} # Create a new document and set UndoLimit NewDocument D BinXCAF diff --git a/tests/de/parse.rules b/tests/de/parse.rules index 813616d1cf..72f0134270 100644 --- a/tests/de/parse.rules +++ b/tests/de/parse.rules @@ -8,4 +8,10 @@ IGNORE /StepFile Error/ message during loading step file IGNORE /StepToTopoDS, GeometricSet/exception IGNORE /OSD_Exception_ACCESS_VIOLATION/ exception during reading step IGNORE /Exception Raised while reading Step File/ exception during reading step file -IGNORE /Warning: ShapeFix_.* Exception/ internal exceptions caught by FixShape \ No newline at end of file +IGNORE /Warning: ShapeFix_.* Exception/ internal exceptions caught by FixShape +IGNORE /DEBUG: [*]+\s+Error on Record [0-9]+ \(on [0-9]+ -> [0-9]+ % in File\)\s+[*]+\s+Ident .[0-9]+/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error : curve 2d range crossing non periodic curve origin/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Warning: ShapeFix_WireSegment::DefineI[UV]M[inax]+: indexation error/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: ShapeFix_ComposeShell::SplitByLine: parity error/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: color name .+ is not recognized/ extended messages of OCCT algorithms only for Debug configuration diff --git a/tests/demo/parse.rules b/tests/demo/parse.rules index 0d2b3c3ef3..1c77a0fc40 100644 --- a/tests/demo/parse.rules +++ b/tests/demo/parse.rules @@ -1,2 +1,3 @@ OK /Wanted exception/ intentionally generated exception FAILED /Failure message/ artificial failure +IGNORE /DEBUG: Error [23]d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/heal/data/advanced/ZE8 b/tests/heal/data/advanced/ZE8 index 4b10e868ca..57418e008f 100644 --- a/tests/heal/data/advanced/ZE8 +++ b/tests/heal/data/advanced/ZE8 @@ -1,6 +1,9 @@ if {[string compare $command "SplitAngle"] == 0 } { puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_" } +if { [checkdebugmode] } { + cpulimit 900 +} restore [locate_data_file BPLSEITLI.brep] a diff --git a/tests/heal/data/advanced/ZE9 b/tests/heal/data/advanced/ZE9 index 627c037280..cd13e10567 100644 --- a/tests/heal/data/advanced/ZE9 +++ b/tests/heal/data/advanced/ZE9 @@ -1,6 +1,9 @@ if {[string compare $command "SplitAngle"] == 0 } { puts "TODO OCC23127 ALL: Faulty shapes in variables faulty_1 to faulty_28 " } +if { [checkdebugmode] } { + cpulimit 900 +} restore [locate_data_file BPLSEITRE.brep] a diff --git a/tests/heal/fix_face_size/parse.rules b/tests/heal/fix_face_size/parse.rules new file mode 100644 index 0000000000..cd009f5616 --- /dev/null +++ b/tests/heal/fix_face_size/parse.rules @@ -0,0 +1 @@ +IGNORE /DEBUG: iteration = [0-9.e+-]+\terror = [0-9.e+-]+\tspans = [0-9.e+-]+/ extended messages of OCCT algorithms only for Debug configuration diff --git a/tests/heal/parse.rules b/tests/heal/parse.rules index 610d206403..959301d447 100644 --- a/tests/heal/parse.rules +++ b/tests/heal/parse.rules @@ -1 +1,7 @@ FAILED /\bFaulty\b/ bad shape +IGNORE /DEBUG:\terror = [0-9.e+-]+\tspans = [0-9.e+-]+/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: ShapeProcess_Performer::Perform: sequence not defined for Seq/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: iteration = [0-9.e+-]+\terror = [0-9.e+-]+\tspans = [0-9.e+-]+/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Warning: ShapeFix_WireSegment::DefineI[UV]M[inax]+: indexation error/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: Number of intervals are not equal for 2d 3d[.] Ignored[.]/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can\'t dispatch wires/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/heal/wire_tails_real/A5 b/tests/heal/wire_tails_real/A5 index 8cbda82dc6..2851dfa1fb 100644 --- a/tests/heal/wire_tails_real/A5 +++ b/tests/heal/wire_tails_real/A5 @@ -1,5 +1,9 @@ pload XDE +if { [checkdebugmode] } { + cpulimit 1200 +} + stepread [locate_data_file bug26261_ca07771-040x.stp] s * renamevar s_1 s fixshape r s -maxtaila 1 -maxtailw 1e-3 diff --git a/tests/heal/wire_tails_real/A7 b/tests/heal/wire_tails_real/A7 index bcfb3b70fb..b3f85e5728 100644 --- a/tests/heal/wire_tails_real/A7 +++ b/tests/heal/wire_tails_real/A7 @@ -1,5 +1,9 @@ pload XDE +if { [checkdebugmode] } { + cpulimit 600 +} + stepread [locate_data_file bug26261_mmg-m-cv-qubit.stp] s * renamevar s_1 s fixshape r s 1e-3 1 -maxtaila 6 -maxtailw 1e-3 diff --git a/tests/mesh/parse.rules b/tests/mesh/parse.rules new file mode 100644 index 0000000000..05d5b39354 --- /dev/null +++ b/tests/mesh/parse.rules @@ -0,0 +1 @@ +IGNORE /DEBUG: Error 3d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/mkface/edges_to_faces/D5 b/tests/mkface/edges_to_faces/D5 index 8587b9924a..6bc2b7fa67 100644 --- a/tests/mkface/edges_to_faces/D5 +++ b/tests/mkface/edges_to_faces/D5 @@ -5,6 +5,9 @@ puts "" ################################################# # Implementation of the EdgesToFaces function ################################################# +if { [checkdebugmode] } { + cpulimit 900 +} restore [locate_data_file bug28284.brep] s eval compound [explode s e] c diff --git a/tests/offset/parse.rules b/tests/offset/parse.rules index 95a93927e0..615413308d 100644 --- a/tests/offset/parse.rules +++ b/tests/offset/parse.rules @@ -1,2 +1,3 @@ FAILED /\bFaulty\b/ bad shape -OK /Relative error of mass computation/ message from vprops \ No newline at end of file +OK /Relative error of mass computation/ message from vprops +IGNORE /DEBUG: Error 3d =/ extended messages of OCCT algorithms only for Debug configuration diff --git a/tests/offset/wire_unclosed_outside_0_025/B9 b/tests/offset/wire_unclosed_outside_0_025/B9 index 0fef765318..24d057f5f5 100644 --- a/tests/offset/wire_unclosed_outside_0_025/B9 +++ b/tests/offset/wire_unclosed_outside_0_025/B9 @@ -1,6 +1,10 @@ puts "TODO OCC24255 ALL: Faulty shapes in variables faulty_1 to faulty_" puts "TODO OCC24255 ALL: Error : big tolerance of shape result" +if { [checkdebugmode] } { + cpulimit 1500 +} + restore [locate_data_file offset_wire_071.brep] s set length 121794 diff --git a/tests/perf/bspline/intersect b/tests/perf/bspline/intersect index 4e3f797bb5..75c6bc7d5e 100644 --- a/tests/perf/bspline/intersect +++ b/tests/perf/bspline/intersect @@ -1,6 +1,6 @@ # Test performance of intersection of several NURBS surfaces -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { cpulimit 1000 } else { cpulimit 500 diff --git a/tests/perf/heal/bug24596_1 b/tests/perf/heal/bug24596_1 index aa242c8aa4..af9955b56e 100644 --- a/tests/perf/heal/bug24596_1 +++ b/tests/perf/heal/bug24596_1 @@ -8,7 +8,7 @@ puts "" pload QAcommands -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { cpulimit 8500 } else { cpulimit 2600 diff --git a/tests/perf/heal/bug24596_2 b/tests/perf/heal/bug24596_2 index aeedf833d1..46827446ef 100644 --- a/tests/perf/heal/bug24596_2 +++ b/tests/perf/heal/bug24596_2 @@ -8,7 +8,7 @@ puts "" pload QAcommands -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { cpulimit 8500 } else { cpulimit 2600 diff --git a/tests/perf/modalg/bug25742_2 b/tests/perf/modalg/bug25742_2 index f636f2683c..0f2f6ac3a5 100755 --- a/tests/perf/modalg/bug25742_2 +++ b/tests/perf/modalg/bug25742_2 @@ -6,8 +6,8 @@ puts "" ## A partition of 2 shapes stresses a performance issue ############################### -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { +if { [checkdebugmode] } { + if { [checkplatform -windows] } { set max_time 10 set max_time2 10 } else { @@ -15,7 +15,7 @@ if { [regexp {Debug mode} [dversion]] } { set max_time2 10 } } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_time 1 set max_time2 1 } else { diff --git a/tests/perf/modalg/bug26310_1 b/tests/perf/modalg/bug26310_1 index 826d18203b..0c280b70a4 100644 --- a/tests/perf/modalg/bug26310_1 +++ b/tests/perf/modalg/bug26310_1 @@ -6,7 +6,7 @@ puts "" # Very slow boolean cut operations on cylinders ################################################# -if { [regexp {Debug mode} [dversion]] } { +if { [checkdebugmode] } { set max_time 0.3 } else { set max_time 0.15 diff --git a/tests/perf/modalg/bug26980 b/tests/perf/modalg/bug26980 index 997bce58ee..2858016624 100644 --- a/tests/perf/modalg/bug26980 +++ b/tests/perf/modalg/bug26980 @@ -6,6 +6,10 @@ puts "" # Intersection part of Boolean algorithm spends much system time and system memory ################################# +if { [checkdebugmode] } { + cpulimit 2000 +} + set max_time 130 set mem_max_wsetpeak 500000000 diff --git a/tests/perf/moddata/bug26339 b/tests/perf/moddata/bug26339 index 267a1f5d98..7980c05b33 100644 --- a/tests/perf/moddata/bug26339 +++ b/tests/perf/moddata/bug26339 @@ -6,14 +6,14 @@ puts "" # [Regression in 6.9.0] Projecting a curve hangs ####################################################################### -if { [regexp {Debug mode} [dversion]] } { - if { [regexp {Windows} [dversion]] } { +if { [checkdebugmode] } { + if { [checkplatform -windows] } { set max_time 10 } else { set max_time 10 } } else { - if { [regexp {Windows} [dversion]] } { + if { [checkplatform -windows] } { set max_time 3 } else { set max_time 3 diff --git a/tests/perf/ncollection/A1 b/tests/perf/ncollection/A1 index 9c50924473..2fddd4443e 100644 --- a/tests/perf/ncollection/A1 +++ b/tests/perf/ncollection/A1 @@ -57,7 +57,7 @@ set index 0 foreach key $keys { set value [lindex $values $index] if { $value > [lindex $check_values $index] } { - puts "Error: performance of $key become worse" + puts "${conf}ERROR: performance of $key become worse" } else { puts "OK: performance of $key is OK" } diff --git a/tests/perf/ncollection/A2 b/tests/perf/ncollection/A2 index 98bd0c6915..6491a4f1c8 100644 --- a/tests/perf/ncollection/A2 +++ b/tests/perf/ncollection/A2 @@ -33,7 +33,7 @@ set index 0 foreach key $keys { set value [lindex $values $index] if { $value > [lindex $check_values $index] } { - puts "ERROR: performance of $key become worse" + puts "${conf}ERROR: performance of $key become worse" } else { puts "OK: performance of $key is OK" } diff --git a/tests/perf/ncollection/A3 b/tests/perf/ncollection/A3 index fb45495fa3..44a091991c 100644 --- a/tests/perf/ncollection/A3 +++ b/tests/perf/ncollection/A3 @@ -33,7 +33,7 @@ set index 0 foreach key $keys { set value [lindex $values $index] if { $value > [lindex $check_values $index] } { - puts "ERROR: performance of $key become worse" + puts "${conf}ERROR: performance of $key become worse" } else { puts "OK: performance of $key is OK" } diff --git a/tests/perf/ncollection/begin b/tests/perf/ncollection/begin new file mode 100644 index 0000000000..c225862616 --- /dev/null +++ b/tests/perf/ncollection/begin @@ -0,0 +1,4 @@ +set conf "" +if { [checkdebugmode] } { + set conf "DEBUG: " +} diff --git a/tests/perf/parse.rules b/tests/perf/parse.rules index 610d206403..4a027f1f72 100644 --- a/tests/perf/parse.rules +++ b/tests/perf/parse.rules @@ -1 +1,6 @@ FAILED /\bFaulty\b/ bad shape +IGNORE /DEBUG: Approximation error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Criterium error :/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error [23]d =/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: Error: ShapeFix_ComposeShell::MakeFacesOnPatch: can\'t dispatch wires/ extended messages of OCCT algorithms only for Debug configuration +IGNORE /DEBUG: ERROR: performance of .+ become worse/ do not check performance for Debug configuration \ No newline at end of file diff --git a/tests/pipe/parse.rules b/tests/pipe/parse.rules index 95a93927e0..1c42e8e76e 100644 --- a/tests/pipe/parse.rules +++ b/tests/pipe/parse.rules @@ -1,2 +1,3 @@ FAILED /\bFaulty\b/ bad shape -OK /Relative error of mass computation/ message from vprops \ No newline at end of file +OK /Relative error of mass computation/ message from vprops +IGNORE /DEBUG: Error 3d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/prj/base/I3 b/tests/prj/base/I3 index 06fa5d9741..50cd670c0b 100644 --- a/tests/prj/base/I3 +++ b/tests/prj/base/I3 @@ -1,3 +1,6 @@ +if { [checkdebugmode] } { + cpulimit 200 +} restore [locate_data_file bug26606_007_extract_2015-01-7108_001_offset.brep] plate restore [locate_data_file bug26606_007_extract_2015-01-7108_019_marker_1.brep] marker set prlist [prj pr marker plate -0.273655 -0.811157 0.516852] \ No newline at end of file diff --git a/tests/thrusection/parse.rules b/tests/thrusection/parse.rules index 95a93927e0..1c42e8e76e 100644 --- a/tests/thrusection/parse.rules +++ b/tests/thrusection/parse.rules @@ -1,2 +1,3 @@ FAILED /\bFaulty\b/ bad shape -OK /Relative error of mass computation/ message from vprops \ No newline at end of file +OK /Relative error of mass computation/ message from vprops +IGNORE /DEBUG: Error 3d =/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file diff --git a/tests/xcaf/parse.rules b/tests/xcaf/parse.rules index 22891c8f97..1af4e3fa62 100644 --- a/tests/xcaf/parse.rules +++ b/tests/xcaf/parse.rules @@ -1 +1,2 @@ IGNORE /Error: STEPCAFControl_Reader::FindInstance: NAUO is not mapped to shape/ bad file in xcaf stp_to_dxc C5 +IGNORE /DEBUG: [*]+\s+Error on Record [0-9]+ \(on [0-9]+ -> [0-9]+ % in File\)\s+[*]+\s+Ident .[0-9]+/ extended messages of OCCT algorithms only for Debug configuration \ No newline at end of file