From: Ovidiu Mircescu Date: Wed, 9 Oct 2019 14:08:01 +0000 (+0200) Subject: C++ tests without salome session. X-Git-Tag: V9_4_0rc1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=48eb472912c9da8e1ea903e7e512bb0f491f36c6;p=tools%2Fydefx.git C++ tests without salome session. --- diff --git a/src/cpp/Test/CTestTestfileInstall.cmake b/src/cpp/Test/CTestTestfileInstall.cmake index c28a019..10fede5 100644 --- a/src/cpp/Test/CTestTestfileInstall.cmake +++ b/src/cpp/Test/CTestTestfileInstall.cmake @@ -34,4 +34,21 @@ ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ./StudyRestartTest SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}" ) - + +SET(TEST_NAME ${COMPONENT_NAME}_NoSession_SampleTest) +ADD_TEST(${TEST_NAME} ./SampleTest) +SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + ) + +SET(TEST_NAME ${COMPONENT_NAME}_NoSession_StudyGeneralTest) +ADD_TEST(${TEST_NAME} ./StudyGeneralTest) +SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + ) + +SET(TEST_NAME ${COMPONENT_NAME}_NoSession_StudyRestartTest) +ADD_TEST(${TEST_NAME} ./StudyRestartTest) +SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES + LABELS "${COMPONENT_NAME}" + ) diff --git a/src/pydefx/configuration.py b/src/pydefx/configuration.py index 34efb55..27d5ff0 100644 --- a/src/pydefx/configuration.py +++ b/src/pydefx/configuration.py @@ -50,7 +50,10 @@ def defaultWckey(resource="localhost"): return result def availableResources(): + """ Return the list of resources defined in the current catalog.""" resManager = salome_proxy.getResourcesManager() params = salome_proxy.createSalomeParameters() params.resource_required.can_launch_batch_jobs = True - return resManager.GetFittingResources(params.resource_required) + # GetFittingResources returns a tuple if in no salome session mode. + # Force to list for uniformity between the two modes. + return list(resManager.GetFittingResources(params.resource_required))