From: Crouzet Nicolas Date: Mon, 17 Feb 2014 12:50:49 +0000 (+0100) Subject: Remove in hxx1 test case all references to MEDMEM X-Git-Tag: V7_4_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8024dcf415;p=tools%2Fyacsgen.git Remove in hxx1 test case all references to MEDMEM --- diff --git a/Examples/hxx1/README b/Examples/hxx1/README index 2c5154f..76fde49 100644 --- a/Examples/hxx1/README +++ b/Examples/hxx1/README @@ -18,6 +18,6 @@ Generate the components with : Test them with - appli/runAppli -u test_compohxx.py + appli/runAppli test_compohxx.py diff --git a/Examples/hxx1/component.py b/Examples/hxx1/component.py index 34a8127..fd78503 100644 --- a/Examples/hxx1/component.py +++ b/Examples/hxx1/component.py @@ -53,18 +53,12 @@ cpppath=os.path.join(cwd,"COMPONENTCPP_INSTALL") os.environ["CALCULCPP_ROOT_DIR"]=cpppath -os.environ["MEDCALCCPP_ROOT_DIR"]=cpppath -os.environ["TESTMEDCPP_ROOT_DIR"]=cpppath os.environ["ICOCOCPP_ROOT_DIR"]=cpppath -os.environ["TESTMEMCPP_ROOT_DIR"]=cpppath c1=HXX2SALOMEComponent("CALCUL.hxx","libCALCULCXX.so" , cpppath ) -c2=HXX2SALOMEComponent("MEDCALC.hxx","libMEDCALCCXX.so" , cpppath ) -c3=HXX2SALOMEComponent("TESTMED.hxx","libTESTMEDCXX.so" , cpppath ) c4=HXX2SALOMEComponent("ICOCO.hxx","libICOCOCXX.so" , cpppath ) -c5=HXX2SALOMEComponent("TESTMEM.hxx","libTESTMEMCXX.so" , cpppath ) -g=Generator(Module("hxxcompos",components=[c4,c1,c2,c3,c5],prefix="./install"),context) +g=Generator(Module("hxxcompos",components=[c4,c1],prefix="./install"),context) g.generate() g.bootstrap() g.configure() @@ -77,10 +71,7 @@ g.make_appli("appli", "YACS":yacs_root_dir, "GEOM":geom_root_dir}) cppenv=""" export CALCULCPP_ROOT_DIR=%(cpppath)s -export MEDCALCCPP_ROOT_DIR=%(cpppath)s -export TESTMEDCPP_ROOT_DIR=%(cpppath)s -export ICOCOCPP_ROOT_DIR=%(cpppath)s -export TESTMEMCPP_ROOT_DIR=%(cpppath)s""" % {"cpppath" : cpppath} +export ICOCOCPP_ROOT_DIR=%(cpppath)s """ % {"cpppath" : cpppath} cppenvfile=open("appli/env.d/cppEnv.sh","w") cppenvfile.write(cppenv) diff --git a/Examples/hxx1/cpp_component.tgz b/Examples/hxx1/cpp_component.tgz index 2298007..92c7422 100644 Binary files a/Examples/hxx1/cpp_component.tgz and b/Examples/hxx1/cpp_component.tgz differ diff --git a/Examples/hxx1/test_compohxx.py b/Examples/hxx1/test_compohxx.py index 5403e6e..a67be56 100644 --- a/Examples/hxx1/test_compohxx.py +++ b/Examples/hxx1/test_compohxx.py @@ -35,74 +35,6 @@ assert ( myCalc.And(True,False)==False ) , 'Erreur dans la fonction And(True,Fal assert ( myCalc.Or(True,False)==True ) , 'Erreur dans la fonction Or(True,False)' print "Fin test hxx2salome/001/A1" # -# -myTestMed = salome.lcc.FindOrLoadComponent("FactoryServerTM", "TESTMED") -myMedCalc = salome.lcc.FindOrLoadComponent("FactoryServerMC", "MEDCALC") -# -banner = myTestMed.getBanner() -print "Banner = ",banner -assert banner == "Hello" , 'erreur dans la fonction getBanner() : mauvaise valeur' -# -print "Creation et tests des supports :" -supportName=myTestMed.getSupportName(myTestMed.getSupport()) -print "Support name : ",supportName -assert supportName == "SupportOnAll_MED_MAILLE" -# -from libMEDClient import FIELDDOUBLEClient -f_loc=FIELDDOUBLEClient(myTestMed.getVolume(myTestMed.getSupport())) -assert f_loc.getNumberOfValues() == 16 , 'created field has incorrect size' -from math import fabs -assert fabs(f_loc.norm2()-6.39444)<1.0e-5 , 'created field has incorrect norm 2' -## -# CNC bug Medclient myTestMed.affiche_fieldT(myTestMed.getVolume(myTestMed.getSupport())) -myTestMed.printSupportEntity(myTestMed.getSupport()) -myMedCalc.printSupport(myTestMed.getSupport()) -myMedCalc.printSupport(myTestMed.getPartialSupport()) -f_part=FIELDDOUBLEClient(myTestMed.getVolume(myTestMed.getPartialSupport())) -assert f_part.getNumberOfValues() == 3, 'created field on partial support has incorrect size' -assert fabs(f_part.norm2()-1.15470)<1.0e-5 , 'created field on partial support has incorrect norm 2' -print "Fin test hxx2salome/003/A1" -# -banner = myTestMed.getBanner() -print "Banner = ",banner -assert banner == "Hello" , 'erreur dans la fonction getBanner() : mauvaise valeur' -# -theMesh= myTestMed.getMesh() -theField = myTestMed.getField() -(theField1,theField2) = myTestMed.create2DoubleField() -#CNC bug Medclient myTestMed.affiche_fieldT(theField1) -mynorm=myTestMed.getNormMax(theField) -from math import fabs -assert fabs(mynorm-3.0)<1.0e-10 , 'created field has incorrect norm 1' -print "Norm of the Field : " , mynorm - -field1 = myTestMed.getConstFieldDouble( 3.0 , "field1" ) -# CNC bug Medclient myTestMed.affiche_fieldT(field1) -print "Creation tableau :" -size=12 -myTab = myTestMed.createDoubleTab(size) -myTabInt = myTestMed.createIntVector(size) -myTestMed.printDoubleTab(myTab) -print "Create a matrix" -myTestMed.printMatrix(myTestMed.createMatrix(size,size)) -print "Fin test hxx2salome/002/A1" - -# -# test of exception mechanism -from SALOME_MED import SUPPORT, MED_NODE, FIELDDOUBLE -test_exception=False -f_cell = myTestMed.getField() -f_node = myTestMed.getFieldOnNode() -try: - f_wrong=myMedCalc.add(f_cell,f_node) -except SALOME.SALOME_Exception, ex: - test_exception=True - print "wrong addition was correctly catched" - print "Exception is : ",ex - -assert test_exception, 'Error in the exception management : the wrong MED addition was not correctly catched' -print "Fin test hxx2salome/003/A2" - myCoco = salome.lcc.FindOrLoadComponent("FactoryServerI", "ICOCO") # liste_champs = myCoco.getInputFieldsNames() diff --git a/module_generator/salomemodules.py b/module_generator/salomemodules.py index 2acc3d9..aae6a8d 100644 --- a/module_generator/salomemodules.py +++ b/module_generator/salomemodules.py @@ -67,9 +67,9 @@ idldefs=""" makefiledefs=""" #module MED MED_IDL_INCLUDES = -I$(MED_ROOT_DIR)/idl/salome -MED_INCLUDES= -I${MED2HOME}/include -I${MED_ROOT_DIR}/include/salome -DH5_USE_16_API -I${HDF5HOME}/include +MED_INCLUDES= -I${MED3HOME}/include -I${MED_ROOT_DIR}/include/salome -DH5_USE_16_API -I${HDF5HOME}/include MED_IDL_LIBS= -L$(MED_ROOT_DIR)/lib/salome -lSalomeIDLMED -MED_LIBS= -L${MED2HOME}/lib -lmed -L${HDF5HOME}/lib -lhdf5 -L${MED_ROOT_DIR}/lib/salome -lSalomeIDLMED -lmedcouplingcorba -lmedcouplingclient +MED_LIBS= -L${MED3HOME}/lib -lmed -L${HDF5HOME}/lib -lhdf5 -L${MED_ROOT_DIR}/lib/salome -lSalomeIDLMED -lmedcouplingcorba -lmedcouplingclient SALOME_LIBS += ${MED_LIBS} SALOME_IDL_LIBS += ${MED_IDL_LIBS} SALOME_INCLUDES += ${MED_INCLUDES}