From 48eb472912c9da8e1ea903e7e512bb0f491f36c6 Mon Sep 17 00:00:00 2001 From: Ovidiu Mircescu Date: Wed, 9 Oct 2019 16:08:01 +0200 Subject: [PATCH] C++ tests without salome session. --- src/cpp/Test/CTestTestfileInstall.cmake | 19 ++++++++++++++++++- src/pydefx/configuration.py | 5 ++++- 2 files changed, 22 insertions(+), 2 deletions(-) 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)) -- 2.39.2