]> SALOME platform Git repositories - tools/ydefx.git/commitdiff
Salome HOME
C++ tests without salome session.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Wed, 9 Oct 2019 14:08:01 +0000 (16:08 +0200)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Wed, 9 Oct 2019 14:08:01 +0000 (16:08 +0200)
src/cpp/Test/CTestTestfileInstall.cmake
src/pydefx/configuration.py

index c28a019cc0f4da86c18c18f1e42718fc3c63b1de..10fede5de116c6fb15d9c179a1e2edb5921f555c 100644 (file)
@@ -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}"
+                    )
index 34efb55ee3efae3e4dfb49cd116225261f14e45f..27d5ff002067a8273b0aff702b9b6a3a9ba1b4cc 100644 (file)
@@ -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))