From 05ec4972c3288b34497510f768184ae15a818842 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Tue, 5 Nov 2024 19:45:59 +0000 Subject: [PATCH] Testing - Update tests with direct VIS loading #148 XShow and XDisplay XDE require VISUALIZATION for correct work. In some scenario DRAWEXE can generate a duplicates of the internal static singletons. This means each dynamic library will have their own instance of the static singleton. Update all direct library loading to use the XDE plugin mechanism. This will ensure that the XDE plugin is loaded only once and that the correct instance is used. Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY". Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen --- tests/de_mesh/gltf_lateload/begin | 2 +- tests/de_mesh/gltf_read/begin | 2 +- tests/de_mesh/gltf_write/begin | 2 +- tests/de_mesh/obj_read/begin | 2 +- tests/de_mesh/obj_write/as1 | 2 +- tests/de_mesh/obj_write/ball | 2 +- tests/de_mesh/obj_write/lantern | 2 +- tests/de_mesh/obj_write/mustang | 2 +- tests/de_mesh/obj_write/ship_boat | 2 +- tests/de_mesh/step_read/begin | 2 +- tests/de_mesh/step_write/begin | 2 +- tests/de_mesh/vrml_read/begin | 1 + tests/v3d/bugs/bug23123 | 2 +- tests/v3d/bugs/bug23407_1 | 2 +- tests/v3d/materials/bug27818_2 | 2 +- tests/v3d/materials/materials | 2 +- 16 files changed, 16 insertions(+), 15 deletions(-) diff --git a/tests/de_mesh/gltf_lateload/begin b/tests/de_mesh/gltf_lateload/begin index a6de429d5c..3dd651892a 100644 --- a/tests/de_mesh/gltf_lateload/begin +++ b/tests/de_mesh/gltf_lateload/begin @@ -1,2 +1,2 @@ -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING catch { Close D } diff --git a/tests/de_mesh/gltf_read/begin b/tests/de_mesh/gltf_read/begin index 41994beb76..57b6107350 100644 --- a/tests/de_mesh/gltf_read/begin +++ b/tests/de_mesh/gltf_read/begin @@ -1,4 +1,4 @@ -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent # PBR requires OpenGL 3.0+ on macOS if { $::tcl_platform(os) == "Darwin" } { vcaps -core } diff --git a/tests/de_mesh/gltf_write/begin b/tests/de_mesh/gltf_write/begin index 41994beb76..57b6107350 100644 --- a/tests/de_mesh/gltf_write/begin +++ b/tests/de_mesh/gltf_write/begin @@ -1,4 +1,4 @@ -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent # PBR requires OpenGL 3.0+ on macOS if { $::tcl_platform(os) == "Darwin" } { vcaps -core } diff --git a/tests/de_mesh/obj_read/begin b/tests/de_mesh/obj_read/begin index 41994beb76..57b6107350 100644 --- a/tests/de_mesh/obj_read/begin +++ b/tests/de_mesh/obj_read/begin @@ -1,4 +1,4 @@ -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent # PBR requires OpenGL 3.0+ on macOS if { $::tcl_platform(os) == "Darwin" } { vcaps -core } diff --git a/tests/de_mesh/obj_write/as1 b/tests/de_mesh/obj_write/as1 index 4490648010..40d1a61eee 100644 --- a/tests/de_mesh/obj_write/as1 +++ b/tests/de_mesh/obj_write/as1 @@ -3,7 +3,7 @@ puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file" puts "Write as1 STEP model into OBJ file" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent Close D1 -silent ReadStep D1 [locate_data_file as1-oc-214-mat.stp] diff --git a/tests/de_mesh/obj_write/ball b/tests/de_mesh/obj_write/ball index 81d586a202..2fa9e0a47f 100644 --- a/tests/de_mesh/obj_write/ball +++ b/tests/de_mesh/obj_write/ball @@ -3,7 +3,7 @@ puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file" puts "Write B-Rep model into OBJ file" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent restore [locate_data_file Ball.brep] b diff --git a/tests/de_mesh/obj_write/lantern b/tests/de_mesh/obj_write/lantern index d8b737cadb..612ba968f4 100644 --- a/tests/de_mesh/obj_write/lantern +++ b/tests/de_mesh/obj_write/lantern @@ -3,7 +3,7 @@ puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file" puts "Write textured lantern glTF model into OBJ file" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent Close D1 -silent ReadGltf D1 [locate_data_file bug30691_Lantern.glb] diff --git a/tests/de_mesh/obj_write/mustang b/tests/de_mesh/obj_write/mustang index 45ffd014d8..792bee321a 100644 --- a/tests/de_mesh/obj_write/mustang +++ b/tests/de_mesh/obj_write/mustang @@ -3,7 +3,7 @@ puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file" puts "Write textured plane OBJ model into OBJ file" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent Close D1 -silent diff --git a/tests/de_mesh/obj_write/ship_boat b/tests/de_mesh/obj_write/ship_boat index efce97c5da..f298cea061 100644 --- a/tests/de_mesh/obj_write/ship_boat +++ b/tests/de_mesh/obj_write/ship_boat @@ -3,7 +3,7 @@ puts "0029303: Data Exchange - add RWObj_CafWriter tool for wavefront OBJ file" puts "Write textured boat OBJ model into OBJ file" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent Close D1 -silent ReadObj D1 [locate_data_file ship_boat.obj] diff --git a/tests/de_mesh/step_read/begin b/tests/de_mesh/step_read/begin index 3e8a24792d..7687cda488 100644 --- a/tests/de_mesh/step_read/begin +++ b/tests/de_mesh/step_read/begin @@ -1,4 +1,4 @@ -pload XDE OCAF MODELING +pload VISUALIZATION XDE OCAF MODELING # enable reading/writing tessellated STEP geometry param write.step.schema AP242DIS diff --git a/tests/de_mesh/step_write/begin b/tests/de_mesh/step_write/begin index 3e8a24792d..7687cda488 100644 --- a/tests/de_mesh/step_write/begin +++ b/tests/de_mesh/step_write/begin @@ -1,4 +1,4 @@ -pload XDE OCAF MODELING +pload VISUALIZATION XDE OCAF MODELING # enable reading/writing tessellated STEP geometry param write.step.schema AP242DIS diff --git a/tests/de_mesh/vrml_read/begin b/tests/de_mesh/vrml_read/begin index 23c0924765..5558728f4f 100644 --- a/tests/de_mesh/vrml_read/begin +++ b/tests/de_mesh/vrml_read/begin @@ -1,5 +1,6 @@ # File: begin +pload VISUALIZATION pload XDE pload OCAF pload TOPTEST diff --git a/tests/v3d/bugs/bug23123 b/tests/v3d/bugs/bug23123 index 76a25f9104..b5a29a3776 100644 --- a/tests/v3d/bugs/bug23123 +++ b/tests/v3d/bugs/bug23123 @@ -3,7 +3,7 @@ puts "OCC23123: Bug/Regression in visualization of XDE documents in shaded mode" puts "============" puts "" -pload XDE VISUALIZATION +pload VISUALIZATION XDE ReadStep D [locate_data_file OCC23123-test.step] XShow D diff --git a/tests/v3d/bugs/bug23407_1 b/tests/v3d/bugs/bug23407_1 index 45b61a3751..0ee1d8eee5 100644 --- a/tests/v3d/bugs/bug23407_1 +++ b/tests/v3d/bugs/bug23407_1 @@ -3,7 +3,7 @@ puts "CR23407: Draw face outlines for XDE objects" puts "============" puts "" -pload XDEDRAW VISUALIZATION STEP +pload VISUALIZATION XDEDRAW STEP XNewDoc Doc1 ReadStep Doc1 [locate_data_file screw.step] diff --git a/tests/v3d/materials/bug27818_2 b/tests/v3d/materials/bug27818_2 index f39796e952..4259457ed2 100644 --- a/tests/v3d/materials/bug27818_2 +++ b/tests/v3d/materials/bug27818_2 @@ -7,7 +7,7 @@ puts "" # test change of highlight and selection properties for particular objects #################################################################################### -pload QAcommands VISUALIZATION +pload VISUALIZATION QAcommands vinit View1 OCC27818 diff --git a/tests/v3d/materials/materials b/tests/v3d/materials/materials index 4b98218849..81138859da 100644 --- a/tests/v3d/materials/materials +++ b/tests/v3d/materials/materials @@ -3,7 +3,7 @@ puts "0030930: Draw Harness, ViewerTest - add commands vlistcolors and vlistmate puts "Generate a table of predefined Materials (Graphic3d_NameOfMaterial enumeration)" puts "========" -pload XDE OCAF MODELING VISUALIZATION +pload VISUALIZATION XDE OCAF MODELING Close D -silent vclear