From: Anthony Geay Date: Thu, 12 Aug 2021 12:05:43 +0000 (+0200) Subject: Switch to SSL mode for tests : naive approach X-Git-Tag: V9_8_0a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=661a5349e78e11441b040fd668698c6062ee1f34;p=modules%2Fshaper.git Switch to SSL mode for tests : naive approach --- diff --git a/src/ConnectorAPI/Test/CTestTestfileInstall.cmake b/src/ConnectorAPI/Test/CTestTestfileInstall.cmake index 6c55e305a..1b92e61d4 100644 --- a/src/ConnectorAPI/Test/CTestTestfileInstall.cmake +++ b/src/ConnectorAPI/Test/CTestTestfileInstall.cmake @@ -20,12 +20,12 @@ INCLUDE(tests.set) SET(COMPONENT_NAME SHAPER) -SET(SALOME_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/salome_test_driver.py") +SET(PYTHON_TEST_DRIVER "$ENV{KERNEL_ROOT_DIR}/bin/salome/appliskel/python_test_driver.py") SET(TIMEOUT 300) FOREACH(tfile ${TEST_NAMES}) SET(TEST_NAME ${COMPONENT_NAME}_${tfile}) - ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) + ADD_TEST(${TEST_NAME} python ${PYTHON_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") ENDFOREACH() diff --git a/src/ConnectorAPI/Test/Test17917.py b/src/ConnectorAPI/Test/Test17917.py index 0cd7bebd0..5eab4d248 100644 --- a/src/ConnectorAPI/Test/Test17917.py +++ b/src/ConnectorAPI/Test/Test17917.py @@ -17,6 +17,10 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +import salome +salome.standalone() +salome.salome_init(1) + from SketchAPI import * from salome.shaper import model from ModelAPI import * @@ -44,13 +48,11 @@ model.exportToGEOM(partSet) model.end() # check what is exported to GEOM -import salome from salome.geom import geomBuilder import os import tempfile -salome.salome_init(1) aComp = salome.myStudy.FindComponent("GEOM") iterator = salome.myStudy.NewChildIterator(aComp) aComponents = [] diff --git a/src/ConnectorAPI/Test/Test18887.py b/src/ConnectorAPI/Test/Test18887.py index 62d667f02..0821ae585 100644 --- a/src/ConnectorAPI/Test/Test18887.py +++ b/src/ConnectorAPI/Test/Test18887.py @@ -19,6 +19,7 @@ import sys import salome +salome.standalone() salome.salome_init() import salome_notebook ### diff --git a/src/ConnectorAPI/Test/Test2882.py b/src/ConnectorAPI/Test/Test2882.py index 640a91be2..4e49849f8 100644 --- a/src/ConnectorAPI/Test/Test2882.py +++ b/src/ConnectorAPI/Test/Test2882.py @@ -21,6 +21,10 @@ from SketchAPI import * from salome.shaper import model +import salome +salome.standalone() +salome.salome_init(1) + model.begin() partSet = model.moduleDocument() Part_1 = model.addPart(partSet) @@ -92,7 +96,6 @@ from salome.geom import geomBuilder import os import tempfile -salome.salome_init(1) aComp = salome.myStudy.FindComponent("GEOM") iterator = salome.myStudy.NewChildIterator(aComp) aComponents = [] diff --git a/src/ConnectorAPI/Test/Test3195.py b/src/ConnectorAPI/Test/Test3195.py index 40442aaa7..a5de06a47 100644 --- a/src/ConnectorAPI/Test/Test3195.py +++ b/src/ConnectorAPI/Test/Test3195.py @@ -19,6 +19,7 @@ import sys import salome +salome.standalone() salome.salome_init() ### ### SHAPER component diff --git a/src/ConnectorAPI/Test/TestExportSTL.py b/src/ConnectorAPI/Test/TestExportSTL.py index a033bfe27..9fe3a0802 100644 --- a/src/ConnectorAPI/Test/TestExportSTL.py +++ b/src/ConnectorAPI/Test/TestExportSTL.py @@ -26,6 +26,7 @@ #========================================================================= import salome +salome.standalone() import os import math diff --git a/src/ConnectorAPI/Test/TestExportToGEOM.py b/src/ConnectorAPI/Test/TestExportToGEOM.py index c83767f76..5d3809d49 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOM.py +++ b/src/ConnectorAPI/Test/TestExportToGEOM.py @@ -20,11 +20,11 @@ import salome from salome.shaper import model -from salome.geom import geomBuilder - import os import tempfile +salome.standalone() +from salome.geom import geomBuilder salome.salome_init(1) geompy = geomBuilder.New() diff --git a/src/ConnectorAPI/Test/TestExportToGEOMAllGroupsAndFields.py b/src/ConnectorAPI/Test/TestExportToGEOMAllGroupsAndFields.py index 1a4e7bb9e..27ed03a6f 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOMAllGroupsAndFields.py +++ b/src/ConnectorAPI/Test/TestExportToGEOMAllGroupsAndFields.py @@ -23,6 +23,7 @@ import tempfile import sys import salome +salome.standalone() salome.salome_init() theStudy = salome.myStudy diff --git a/src/ConnectorAPI/Test/TestExportToGEOMPartSet.py b/src/ConnectorAPI/Test/TestExportToGEOMPartSet.py index d2b723ee3..6bba07895 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOMPartSet.py +++ b/src/ConnectorAPI/Test/TestExportToGEOMPartSet.py @@ -21,11 +21,12 @@ import salome from ModelAPI import * from salome.shaper import model -from salome.geom import geomBuilder import os import tempfile +salome.standalone() +from salome.geom import geomBuilder salome.salome_init(1) geompy = geomBuilder.New() diff --git a/src/ConnectorAPI/Test/TestExportToGEOMWholeFeature.py b/src/ConnectorAPI/Test/TestExportToGEOMWholeFeature.py index 4fabe756d..abf2e7d9c 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOMWholeFeature.py +++ b/src/ConnectorAPI/Test/TestExportToGEOMWholeFeature.py @@ -21,11 +21,12 @@ import salome from SketchAPI import * from salome.shaper import model -from salome.geom import geomBuilder import os import tempfile +salome.standalone() +from salome.geom import geomBuilder salome.salome_init(1) geompy = geomBuilder.New() diff --git a/src/ConnectorAPI/Test/TestExportToGEOMWholeResult.py b/src/ConnectorAPI/Test/TestExportToGEOMWholeResult.py index 2c51d8ae3..6bccc592b 100644 --- a/src/ConnectorAPI/Test/TestExportToGEOMWholeResult.py +++ b/src/ConnectorAPI/Test/TestExportToGEOMWholeResult.py @@ -20,11 +20,12 @@ import salome from salome.shaper import model -from salome.geom import geomBuilder import os import tempfile +salome.standalone() +from salome.geom import geomBuilder salome.salome_init(1) geompy = geomBuilder.New() diff --git a/src/ConnectorAPI/Test/TestImportSTEP.py b/src/ConnectorAPI/Test/TestImportSTEP.py index 61fed85b8..a44cc9836 100644 --- a/src/ConnectorAPI/Test/TestImportSTEP.py +++ b/src/ConnectorAPI/Test/TestImportSTEP.py @@ -41,6 +41,7 @@ from GeomAlgoAPI import * __updated__ = "2015-05-22" +salome.standalone() salome.salome_init(1) #========================================================================= diff --git a/src/ConnectorAPI/Test/TestImportSTL.py b/src/ConnectorAPI/Test/TestImportSTL.py old mode 100755 new mode 100644 index b55211ef0..3314ec49e --- a/src/ConnectorAPI/Test/TestImportSTL.py +++ b/src/ConnectorAPI/Test/TestImportSTL.py @@ -21,6 +21,7 @@ import os from salome.shaper import model import salome +salome.standalone() salome.salome_init(1) data_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")