From 80da794eaaed5ff72b822aec5ef43ab84704712e Mon Sep 17 00:00:00 2001 From: gdd Date: Thu, 15 Nov 2012 14:52:26 +0000 Subject: [PATCH] Add missing getVersion function Fix indentation and ref name in doc Update tests --- doc/gui_create_case.rst | 1 + doc/tui_create_boundary.rst | 2 +- src/HOMARD_I/HOMARD_Gen_i.cxx | 13 +++++++++++++ tests/test_1.py | 6 ++++-- tests/test_2.py | 5 +++-- tests/test_3.py | 6 ++++-- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/gui_create_case.rst b/doc/gui_create_case.rst index 5758e8e9..aaac4a77 100644 --- a/doc/gui_create_case.rst +++ b/doc/gui_create_case.rst @@ -97,6 +97,7 @@ Par d - tétraèdres - hexaèdres - prismes + Si le maillage initial comporte des pyramides, il y a arrêt en erreur. Toutefois, si on est certain que les raffinements ultérieurs ne toucheront aucune des arêtes des pyramides, on cochera la case "Pyramides autorisées". Les adaptations se dérouleront normalement et les pyramides seront restituées telles quelles dans le maillage final. L'arbre d'étude diff --git a/doc/tui_create_boundary.rst b/doc/tui_create_boundary.rst index ea7f004e..73bf0cdd 100644 --- a/doc/tui_create_boundary.rst +++ b/doc/tui_create_boundary.rst @@ -1,4 +1,4 @@ -.. _gui_create_hypothese: +.. _tui_create_boundary: L'hypothèse =========== diff --git a/src/HOMARD_I/HOMARD_Gen_i.cxx b/src/HOMARD_I/HOMARD_Gen_i.cxx index 63c6887d..da4aa8b4 100755 --- a/src/HOMARD_I/HOMARD_Gen_i.cxx +++ b/src/HOMARD_I/HOMARD_Gen_i.cxx @@ -27,6 +27,8 @@ #include "HOMARD_DriverTools.hxx" #include "HomardMedCommun.h" +#include "HOMARD_version.h" + #include "utilities.h" #include "Utils_SINGLETON.hxx" #include "Utils_CorbaException.hxx" @@ -2704,6 +2706,17 @@ Engines::TMPFile* HOMARD_Gen_i::DumpPython(CORBA::Object_ptr theStudy, return aStreamFile._retn(); } + +// Version information +char* HOMARD_Gen_i::getVersion() +{ +#if HOMARD_DEVELOPMENT + return CORBA::string_dup(HOMARD_VERSION_STR"dev"); +#else + return CORBA::string_dup(HOMARD_VERSION_STR); +#endif +} + //============================================================================= extern "C" { diff --git a/tests/test_1.py b/tests/test_1.py index a769a9f4..74a1f658 100644 --- a/tests/test_1.py +++ b/tests/test_1.py @@ -132,6 +132,8 @@ Copyright EDF-R&D 2010 ###################################################################################### homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD') +assert homard is not None, "Impossible to load homard engine" + # # Exec of HOMARD-SALOME # @@ -139,8 +141,8 @@ try : error_main = homard_exec(salome.myStudy) if error_main : raise Exception('Pb in homard_exec at iteration %d' %error_main ) -except : - raise Exception('Pb in homard_exec') +except Exception, e: + raise Exception('Pb in homard_exec: '+e.message) # # Test of the result diff --git a/tests/test_2.py b/tests/test_2.py index 5f86dd09..afb705f2 100644 --- a/tests/test_2.py +++ b/tests/test_2.py @@ -121,6 +121,7 @@ Copyright EDF-R&D 2010 ###################################################################################### homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD') +assert homard is not None, "Impossible to load homard engine" # # Exec of HOMARD-SALOME # @@ -128,8 +129,8 @@ try : error_main = homard_exec(salome.myStudy) if error_main : raise Exception('Pb in homard_exec at iteration %d' %error_main ) -except : - raise Exception('Pb in homard_exec') +except Exception, e: + raise Exception('Pb in homard_exec: '+e.message) # # Test of the result diff --git a/tests/test_3.py b/tests/test_3.py index 2aef04f5..98c4e6e3 100644 --- a/tests/test_3.py +++ b/tests/test_3.py @@ -120,6 +120,8 @@ Copyright EDF-R&D 2010 ###################################################################################### homard = salome.lcc.FindOrLoadComponent('FactoryServer', 'HOMARD') +assert homard is not None, "Impossible to load homard engine" + # # Exec of HOMARD-SALOME # @@ -127,8 +129,8 @@ try : error_main = homard_exec(salome.myStudy) if error_main : raise Exception('Pb in homard_exec at iteration %d' %error_main ) -except : - raise Exception('Pb in homard_exec') +except Exception, e: + raise Exception('Pb in homard_exec: '+e.message) # # Test of the result -- 2.39.2