DEBTRACE(" output port name for graphe = " << _nodeMap["graphe"]->getOutPortName(*it));
}
YACS::ENGINE::VisitorSaveState vst(_compoMap["graphe"]);
- vst.openFileDump("dumpState.xml");
+ vst.openFileDump("/tmp/RecursiveBlocs_multipleRecursion_dumpState.xml");
_compoMap["graphe"]->accept(&vst);
vst.closeFileDump();
}
IF(SALOME_BUILD_TESTS)
+ SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/pmml)
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
ADD_SUBDIRECTORY(Test)
+
ENDIF(SALOME_BUILD_TESTS)
--- /dev/null
+# Copyright (C) 2015-2019 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+
+# Add all test subdirs
+SUBDIRS(
+Test
+pmml_swig
+)
#
-SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/pmml)
-FILE(COPY ${PROJECT_SOURCE_DIR}/src/pmml/Test/samples DESTINATION "${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}")
+SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/pmml/Test)
INSTALL(TARGETS TestPMML DESTINATION ${LOCAL_TEST_DIR})
INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${LOCAL_TEST_DIR} RENAME CTestTestfile.cmake)
+FILE(GLOB sample_files ${PROJECT_SOURCE_DIR}/src/pmml/Test/samples/*)
+INSTALL(FILES ${sample_files} DESTINATION ${LOCAL_TEST_DIR}/samples)
SET(TEST_NAME ${COMPONENT_NAME}_YacsTestPMML)
ADD_TEST(${TEST_NAME} TestPMML)
SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
-
- SET(TEST_NAME ${COMPONENT_NAME}_YacsPMMLBasicsTest)
- ADD_TEST(${TEST_NAME} python pmml_swig/PMMLBasicsTestLauncher.py)
- SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
ENDIF(NOT WIN32)
#
-SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/pmml/pmml_swig)
-FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/PMMLBasicsTest.py DESTINATION "${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}")
-FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/PMMLBasicsTestLauncher.py DESTINATION "${CMAKE_INSTALL_PREFIX}/${LOCAL_TEST_DIR}")
+IF(SALOME_BUILD_TESTS)
+ SET(LOCAL_TEST_DIR ${SALOME_YACS_INSTALL_TEST}/pmml/pmml_swig)
+ INSTALL(FILES CTestTestfileInstall.cmake
+ DESTINATION ${LOCAL_TEST_DIR}
+ RENAME CTestTestfile.cmake)
+ SET(LOCAL_TEST_FILES
+ PMMLBasicsTest.py
+ )
+ INSTALL(FILES ${LOCAL_TEST_FILES}
+ DESTINATION ${LOCAL_TEST_DIR})
+
+ENDIF(SALOME_BUILD_TESTS)
--- /dev/null
+# Copyright (C) 2015-2019 CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+IF(NOT WIN32)
+ SET(TEST_NAME ${COMPONENT_NAME}_YacsPMMLBasicsTest)
+ ADD_TEST(${TEST_NAME} python PMMLBasicsTest.py)
+ SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}")
+ENDIF(NOT WIN32)
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2019 CEA/DEN, EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-
-import os,sys,subprocess,shutil
-
-# Here the most beautiful part of test :)
-dirALaCon0="Test"
-dirAlaCon1="samples"
-if not os.path.exists(dirALaCon0):
- os.mkdir(dirALaCon0)
-if not os.path.exists(os.path.join(dirALaCon0,dirAlaCon1)):
- os.chdir(dirALaCon0)
- os.symlink(os.path.join("..",dirAlaCon1),dirAlaCon1)
- os.chdir("..")
-# GO !
-dn=os.path.dirname(__file__)
-p=subprocess.Popen(["python3","PMMLBasicsTest.py"],cwd=dn,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
-a,b=p.communicate()
-ret=p.returncode
-# Clean up the wonderful first part stuf
-shutil.rmtree(dirALaCon0)
-sys.exit(ret)
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-BASEREP=`pwd`
-OMNIORB_CONFIG=${BASEREP}/omniorb.cfg
-OMNINAMES_LOGDIR=${BASEREP}/omnilog
+BASEDIR=`pwd`
+TESTDIR=$(mktemp -d --suffix=.yacstest)
+OMNIORB_CONFIG=${TESTDIR}/omniorb.cfg
+OMNINAMES_LOGDIR=${TESTDIR}/omnilog
-export BASEREP
+export TESTDIR
export OMNIORB_CONFIG
export OMNINAMES_LOGDIR
-echo ${BASEREP}
+echo ${TESTDIR}
echo ${OMNIORB_CONFIG}
# do not use the default port 2810 for omninames (to improve, cf. SALOME)
pidecho=$!
echo $pidecho
-if ! [ -f lib/salome/libTestComponentLocal.so ]
-then
- mkdir -p lib/salome
- cp libTestComponentLocal.so lib/salome
-fi
-export TESTCOMPONENT_ROOT_DIR=`pwd`
+# this find should work both for make test and for salome test
+mkdir -p ${TESTDIR}/lib/salome
+LIBTEST=`find .. -name libTestComponentLocal.so | head -n 1`
+cp $LIBTEST ${TESTDIR}/lib/salome
+
+export TESTCOMPONENT_ROOT_DIR=${TESTDIR}
#wait enough time to let runtimeTestEchoSrv start and register
sleep 2
+cp xmlrun.sh ${TESTDIR}
+cp TestRuntime ${TESTDIR}
+cd ${TESTDIR}
./TestRuntime
ret=$?
+cd -
kill -9 $pidecho $pidomni
cat /tmp/${USER}/UnitTestsResult
# --- launch unit tests
export ROOT_SAMPLES=@CMAKE_SOURCE_DIR@/src/yacsloader/samples
-export TESTCOMPONENT_ROOT_DIR=@CMAKE_BINARY_DIR@/src/runtime/Test
+export TESTCOMPONENT_ROOT_DIR=$(mktemp -d --suffix=.yacstest)
+
+mkdir -p ${TESTCOMPONENT_ROOT_DIR}/lib/salome
+LIBTEST=`find ../.. -name libTestComponentLocal.so | head -n 1`
+cp $LIBTEST ${TESTCOMPONENT_ROOT_DIR}/lib/salome
./TestYacsLoader
ret=$?
./echoSrv &
pidecho=$!
-export TESTCOMPONENT_ROOT_DIR=`pwd`/../runtime
+BASEDIR=`pwd`
+TESTDIR=$(mktemp -d --suffix=.yacstest)
+export TESTCOMPONENT_ROOT_DIR=${TESTDIR}
-./TestYacsLoader
+mkdir -p ${TESTDIR}/lib/salome
+LIBTEST=$BASEDIR/../runtime/lib/salome/libTestComponentLocal.so
+cp $LIBTEST ${TESTDIR}/lib/salome
+LIBDIR=$BASEDIR/../lib
+
+cp xmlrun.sh $TESTDIR
+cp *.py $TESTDIR
+ln -s $BASEDIR/samples $TESTDIR/samples
+cd $TESTDIR
+LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR $BASEDIR/TestYacsLoader
ret=$?
+cd $BASEDIR
echo "exec status TestYacsLoader " $ret
kill -9 $pidecho
-exit $ret
\ No newline at end of file
+exit $ret
testValidationChecks.py
testProgress.py
testExecForEachGeoMesh.py
+ async_plugin.py
)
INSTALL(FILES ${LOCAL_TEST_FILES}
DESTINATION ${LOCAL_TEST_DIR})
import SALOMERuntime
import loader
import unittest
+import tempfile
+import os
class StdAloneYacsLoaderTest1(unittest.TestCase):
SALOMERuntime.RuntimeSALOME_setRuntime()
self.r = pilot.getRuntime()
self.l = loader.YACSLoader()# self.l.load("foreachImbr_tmp.xml")
+ self.workdir = tempfile.mkdtemp(suffix=".yacstest")
pass
def test1(self):
self.assertEqual(p.getState(),pilot.DONE)
zeResu=node3.getOutputPort("o3").get()
self.assertEqual(zeResu,[[[3.,3.],[4.,4.,4.]],[[12.],[13.,13.],[14.,14.,14.]],[[22.],[23.,23.],[24.,24.,24.],[25.,25.,25.,25.]]])
- p.saveSchema("foreachImbrBuildFS.xml")
+ fname = os.path.join(self.workdir, "foreachImbrBuildFS.xml")
+ p.saveSchema(fname)
pass
def test2(self):
""" Non regression test. When input/output declared as pyobj hiding a string type to go to or from a ForEachLoop it previous lead
to an error.
"""
- fname="BugPyObjStrInYacs.xml"
+ fname=os.path.join(self.workdir, "BugPyObjStrInYacs.xml")
p=self.r.createProc("pr")
tc0=p.createInterfaceTc("python:obj:1.0","pyobj",[])
tc1=p.createSequenceTc("list[pyobj]","list[pyobj]",tc0)
def test3(self):
""" Non regression test Mantis 23234 CEA1726"""
- fname="test23234.xml"
+ fname=os.path.join(self.workdir, "test23234.xml")
p=self.r.createProc("Test23234")
ti=p.createType("int","int")
initNode=self.r.createScriptNode("","init")
def test4(self):
""" test linked to TestSaveLoadRun.test20. This is a smaller test coming from EDF autotest"""
- xmlFileName="test4.xml"
p=self.r.createProc("test26")
n=self.r.createScriptNode("","node1")
n.setScript("import os")
def test5(self):
""" Test focusing P13268. If I connect a list[pyobj] output inside a ForEach to a list[pyobj] outside a foreach it works now."""
#self.assertTrue(False)
- fname="testP1328.xml"
+ fname=os.path.join(self.workdir, "testP1328.xml")
p=self.r.createProc("testP1328")
tc0=p.createInterfaceTc("python:obj:1.0","pyobj",[])
tc1=p.createSequenceTc("list[pyobj]","list[pyobj]",tc0)
def test6(self):
""" Test focusing on P13766. Test of a connection of 2 foreach at same level where the output pyobj is connected to the list[pyobj] input samples of the 2nd foreach"""
- fname="testP13766.xml"
+ fname=os.path.join(self.workdir, "testP13766.xml")
p=self.r.createProc("testP13766")
tc0=p.createInterfaceTc("python:obj:1.0","pyobj",[])
tc1=p.createSequenceTc("list[pyobj]","list[pyobj]",tc0)
def test7(self):
"""EDF17963 : Python3 porting. Py3 Pickeling generates more often byte(0) into the bytes. This reveals an incorrect management of Python Bytes -> Any String that leads to truncated bytes."""
- async_algo_script="""import SALOMERuntime
-
-class myalgosync(SALOMERuntime.OptimizerAlgSync):
- def __init__(self):
- SALOMERuntime.OptimizerAlgSync.__init__(self, None)
- r=SALOMERuntime.getSALOMERuntime()
- self.tin=r.getTypeCode("double")
- self.tout=r.getTypeCode("int")
- self.tAlgoInit=r.getTypeCode("pyobj")
- self.tAlgoResult=r.getTypeCode("pyobj")
-
- def setPool(self,pool):
- print("Algo setPool")
-
- def getTCForIn(self):
- return self.tin
-
- def getTCForOut(self):
- return self.tout
-
- def getTCForAlgoInit(self):
- return self.tAlgoInit
-
- def getTCForAlgoResult(self):
- return self.tAlgoResult
-
- def initialize(self,input):
- print ("Algo initialize")
-
- def start(self):
- print ("Algo start")
-
- def takeDecision(self):
- print ("Algo takeDecision")
-
- def finish(self):
- print ("Algo finish")
-
- def getAlgoResult(self):
- print("Algo getAlgoResult : on charge un objet complet obtenu en pickle 9.2 avant tuyau")
- import pickle
- import numpy as np
- resu = np.array(range(1),dtype=np.int32)
- ob=pickle.dumps(resu,protocol=0)
- assert(bytes([0]) in ob) # test is here presence of 0 in the pickelization
- return ob"""
entree_script="""Study = "toto"
print("Entree", Study)"""
"""
nbWorkers=1
- fname="test7.xml"
SALOMERuntime.RuntimeSALOME.setRuntime()
r=SALOMERuntime.getSALOMERuntime()
#
- with open("async_plugin.py","w") as f:
- f.write(async_algo_script)
- #
p0=r.createProc("run")
#
td=p0.createType("double","double")
--- /dev/null
+import SALOMERuntime
+
+class myalgosync(SALOMERuntime.OptimizerAlgSync):
+ def __init__(self):
+ SALOMERuntime.OptimizerAlgSync.__init__(self, None)
+ r=SALOMERuntime.getSALOMERuntime()
+ self.tin=r.getTypeCode("double")
+ self.tout=r.getTypeCode("int")
+ self.tAlgoInit=r.getTypeCode("pyobj")
+ self.tAlgoResult=r.getTypeCode("pyobj")
+
+ def setPool(self,pool):
+ print("Algo setPool")
+
+ def getTCForIn(self):
+ return self.tin
+
+ def getTCForOut(self):
+ return self.tout
+
+ def getTCForAlgoInit(self):
+ return self.tAlgoInit
+
+ def getTCForAlgoResult(self):
+ return self.tAlgoResult
+
+ def initialize(self,input):
+ print ("Algo initialize")
+
+ def start(self):
+ print ("Algo start")
+
+ def takeDecision(self):
+ print ("Algo takeDecision")
+
+ def finish(self):
+ print ("Algo finish")
+
+ def getAlgoResult(self):
+ print("Algo getAlgoResult : on charge un objet complet obtenu en pickle 9.2 avant tuyau")
+ import pickle
+ import numpy as np
+ resu = np.array(range(1),dtype=np.int32)
+ ob=pickle.dumps(resu,protocol=0)
+ assert(bytes([0]) in ob) # test is here presence of 0 in the pickelization
+ return ob
import time
import unittest
import threading
+import tempfile
+import os
import SALOMERuntime
import loader
self.l = loader.YACSLoader()
self.e = pilot.ExecutorSwig()
self.p = self.l.load("samples/aschema.xml")
+ self.workdir = tempfile.mkdtemp(suffix=".yacstest")
pass
def test1_StepByStep(self):
run4.start()
time.sleep(0.1)
self.e.waitPause()
- self.e.saveState("dumpErrorASchema.xml")
+ self.e.saveState(os.path.join(self.workdir, "dumpErrorASchema.xml"))
self.e.setStopOnError(False)
self.e.resumeCurrentBreakPoint()
time.sleep(0.1)
time.sleep(0.1)
self.e.waitPause()
#self.e.displayDot(self.p)
- self.e.saveState('dumpPartialASchema.xml')
+ self.e.saveState(os.path.join(self.workdir, 'dumpPartialASchema.xml'))
#self.e.displayDot(self.p)
self.e.stopExecution()
run5.join()
import time
import unittest
import threading
+import tempfile
+import os
import SALOMERuntime
import loader
self.l = loader.YACSLoader()
self.e = pilot.ExecutorSwig()
self.p = self.l.load("samples/bloc2.xml")
+ workdir = tempfile.mkdtemp(suffix=".yacstest")
+ self.statefile = os.path.join(workdir, 'dumpPartialBloc2.xml')
pass
def test1_PartialExec(self):
time.sleep(0.1)
self.e.waitPause()
#self.e.displayDot(self.p)
- self.e.saveState('dumpPartialBloc2.xml')
+ self.e.saveState(self.statefile)
#self.e.displayDot(self.p)
self.e.stopExecution()
#self.e.displayDot(self.p)
self.assertEqual(101, self.p.getChildByName('b1.b2.node1').getEffectiveState())
self.assertEqual(106, self.p.getChildByName('b1.node1').getEffectiveState())
print("================= reach BREAKPOINT PARTIAL EXEC ==========")
- pass
- def test2_ExecFromLoadState(self):
# --- reload state from previous partial execution then exec
time.sleep(1)
print("================= Start of EXECLOADEDSTATE ===============")
sp = loader.stateParser()
sl = loader.stateLoader(sp,self.p)
- sl.parse('dumpPartialBloc2.xml')
+ sl.parse(self.statefile)
#self.e.displayDot(self.p)
self.e.setExecMode(0) # YACS::CONTINUE
run2 = threading.Thread(None, self.e.RunPy, "loadState", (self.p,0,True,True))
import time
import unittest
import threading
+import tempfile
+import os
import SALOMERuntime
import loader
def setUp(self):
SALOMERuntime.RuntimeSALOME_setRuntime(1)
+ self.workdir = tempfile.mkdtemp(suffix=".yacstest")
pass
def test0_saveAndExec(self):
e = pilot.ExecutorSwig()
for schema in schemaList:
fileOrig = "samples/" + schema + ".xml"
- saveSchema1 = "schema1_" + schema
- dumpSchema1 = "dump1_" + schema
- saveSchema2 = "schema2_" + schema
- dumpSchema2 = "dump2_" + schema
+ saveSchema1 = os.path.join(self.workdir, "schema1_" + schema)
+ dumpSchema1 = os.path.join(self.workdir, "dump1_" + schema)
+ saveSchema2 = os.path.join(self.workdir, "schema2_" + schema)
+ dumpSchema2 = os.path.join(self.workdir, "dump2_" + schema)
try:
p = l.load(fileOrig)
s = pilot.SchemaSave(p)
#
import unittest
+import tempfile
+import os
+
import pilot
import SALOMERuntime
import loader
def setUp(self):
SALOMERuntime.RuntimeSALOME.setRuntime()
self.r=SALOMERuntime.getSALOMERuntime()
+ self.workdir = tempfile.mkdtemp(suffix=".yacstest")
pass
def test0(self):
"""First test of HP Container no loop here only the 3 sorts of python nodes (the Distributed is it still used and useful ?) """
- fname="TestSaveLoadRun0.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun0.xml")
nbOfNodes=8
sqrtOfNumberOfTurn=1000 # 3000 -> 3.2s/Node, 1000 -> 0.1s/Node
l=loader.YACSLoader()
def test1(self):
""" HP Container again like test0 but the initialization key of HPContainer is used here."""
- fname="TestSaveLoadRun1.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun1.xml")
nbOfNodes=8
sqrtOfNumberOfTurn=1000 # 3000 -> 3.2s/Node, 1000 -> 0.1s/Node
l=loader.YACSLoader()
"""
script2="""o9=sum(i8)
"""
- fname="TestSaveLoadRun2.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun2.xml")
nbOfNodes=8
sqrtOfNumberOfTurn=1000 # 3000 -> 3.2s/Node, 1000 -> 0.1s/Node
l=loader.YACSLoader()
"""
script2="""o9=sum(i8)
"""
- fname="TestSaveLoadRun3.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun3.xml")
nbOfNodes=8
sqrtOfNumberOfTurn=10
l=loader.YACSLoader()
def test4(self):
"""Non regression test of multi pyScriptNode, pyFuncNode sharing the same HPContainer instance."""
- fname="TestSaveLoadRun4.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun4.xml")
script1="""nb=7
ii=0
o1=nb*[None]
def test5(self):
"""Non regression test 2 of multi pyNode, pyFuncNode sharing the same HPContainer instance."""
- fname="TestSaveLoadRun5.xml"
+ fname=os.path.join(self.workdir, "TestSaveLoadRun5.xml")
script1="""nb=7
ii=0
o1=nb*[None]
pass
def test6(self):
- fname="test6.xml"
+ fname=os.path.join(self.workdir, "test6.xml")
p=self.r.createProc("prTest0")
td=p.createType("double","double")
ti=p.createType("int","int")
pass
def test7(self):
- fname="test7.xml"
+ fname=os.path.join(self.workdir, "test7.xml")
p=self.r.createProc("prTest1")
cont=p.createContainer("gg","Salome")
cont.setProperty("name","localhost")
def test8(self):
from datetime import datetime
- fname="test8.xml"
+ fname=os.path.join(self.workdir, "test8.xml")
p=self.r.createProc("prTest2")
cont=p.createContainer("gg","Salome")
cont.setProperty("name","localhost")
def test9(self):
""" Test of assignation of already computed values for foreach node."""
- fname="test9.xml"
+ fname=os.path.join(self.workdir, "test9.xml")
from datetime import datetime
p=self.r.createProc("prTest2")
cont=p.createContainer("gg","Salome")
pass
def test10(self):
- fname="test10.xml"
+ fname=os.path.join(self.workdir, "test10.xml")
from datetime import datetime
p=self.r.createProc("prTest2")
cont=p.createContainer("gg","Salome")
def test11(self):
"test if we do not restart from the begining of the schema after an error in a foreach"
- fname="test11.xml"
+ fname=os.path.join(self.workdir, "test11.xml")
from datetime import datetime
p=self.r.createProc("prTest2")
cont=p.createContainer("gg","Salome")
def test14(self):
""" Non regression EDF11027. Problem after Save/Load of a foreach node with type pyobj with input "SmplsCollection" manually set before. Correction in convertToYacsObjref from XML->Neutral. Objref can hide a string !"""
- xmlFileName="test14.xml"
+ xmlFileName=os.path.join(self.workdir, "test14.xml")
SALOMERuntime.RuntimeSALOME_setRuntime()
r=pilot.getRuntime()
n0=r.createProc("test23/zeRun")
pass
def test15(self):
- fname="BugInConcurrentLaunchDftCont.xml"
+ #fname=os.path.join(self.workdir, "BugInConcurrentLaunchDftCont.xml")
p=self.r.createProc("pr")
ti=p.createType("int","int")
cont=p.createContainer("DefaultContainer","Salome")
def test19(self):
"""This test checks the mechanism of YACS that allow PythonNodes to know their DynParaLoop context."""
- fname="test19.xml"
+ fname=os.path.join(self.workdir, "test19.xml")
l=loader.YACSLoader()
#
p=self.r.createProc("PROC")
def test21(self):
"test if we restart from a saved state in a foreach loop"
- fname="test21.xml"
- xmlStateFileName="saveState21.xml"
+ fname=os.path.join(self.workdir, "test21.xml")
+ xmlStateFileName=os.path.join(self.workdir, "saveState21.xml")
from datetime import datetime
p=self.r.createProc("prTest21")
cont=p.createContainer("gg","Salome")
p.getChildByName("n1").assignPassedResults(a,b,c)
p.exUpdateState();
#
- startt=datetime.now()
ex.RunW(p,0,False)
- t1=datetime.now()-startt
#
self.assertEqual(n1.getState(),pilot.DONE)
self.assertEqual(p.getState(),pilot.DONE)
self.assertEqual(p.getChildByName("n2").getOutputPort("o4").getPyObj(),[0,2,10,15,20,25])
- pass
- pass
- def test22(self):
- """Restart from a saved state in a foreach loop without using assignPassedResults.
- This test uses the files test21.xml and saveState21.xml produced by test21.
- """
- fname="test21.xml"
- xmlStateFileName="saveState21.xml"
+ # Restart from a saved state in a foreach loop without using assignPassedResults.
+ # This test uses the files test21.xml and saveState21.xml produced by test21.
ex=pilot.ExecutorSwig()
l=loader.YACSLoader()
def test23(self):
""" test focused on weight attribut after a dump and reload from a xml file
"""
- fname="test23.xml"
- xmlStateFileName="saveState23.xml"
- from datetime import datetime
+ fname=os.path.join(self.workdir, "test23.xml")
p=self.r.createProc("prTest23")
cont=p.createContainer("gg","Salome")
cont.setProperty("name","localhost")
pass
def test25(self):
- fname="test25.xml"
+ fname=os.path.join(self.workdir, "test25.xml")
p=self.r.createProc("p0")
tp=p.createInterfaceTc("python:obj:1.0","pyobj",[])
n1_0_sc=self.r.createScriptNode("Salome","n1_0_sc")
import os
content_of_file = b'DDkShXM2PeNCndPqRfnYX5EAt.GaRgPq7dNqtfnYZgvqh=kQf7moXCE2z5lED.tCxgM2RcOqdfl29ePC9YnAx3uaGetqF5lE=.E2D0uS1eM2RcOqdfl2FjPqBYE2pdNq7fl2FjPqBYHoT3.2=.Ew9dsCdUFqVfOaj2Eaxet4BeN2=BOKRWOwF0PqfYMqdYHoT3.2=.EwxYNKHeNa=5O4heOwF4OKBeN2=7Maj2FaZXOaFDFwI.E2=1kibUua=5O4heOwF7Nq9YE2pdNq7fl2ZbMiFDFwI.E2=1nqFZNCdaM2RcOqdfl21dvqFZN2=7Maj2ECbWsKxbNQxYNKL6lo12HoT3.2=.EwneOCfeNqleM2RcOqdfl2BdPC9hcCbjN4Jfd2=APqRWuaRWuwF.uSxYNKFDFwI.E2=1kibUua=5O4heOwFAsiHdNqtYE2pdNq7fl2nWtCZbPaFDFwI.E2=1n4xbMiVdNqdYs2RcOqdfl26eNaVesq9g9qRWu4ZbOaHYFwI.E2=.E2=1kCHjMCdYsibUFqVfOaj2H4xbMiVdNqdYvupdNq7YE2PcMqfeOwFAe4BjOqdYHoT3.2=.E2=.Ew1Yvq1eNC9ds2RcOqdfl2VWsiVgMKdWPuxbPulXPqRdNqtYE2PcMqfeOwF.l2x5lE=.E2=.E2D.tCxUuaHWuS=5O4heOwFAPqRWu4ZbOaHjdqVfOaF.FiVXOidfl2McP49jNCbgeaHauaHYHoT3.2=.E2=.Ew1Yvq1eNC9ds2RcOqdfl2RcOqdYE2PcMqfeOwF1PqlcMq3jPC9YHoT3.2=.EwxAPqRWu4ZbOaHblE=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PcMqfeNwDAsiHdNqtbkm917ER1nonWtCZbPaT1noPcMqfeNwI1liVXOidbkwnWtCZbPaT18gAZ=oDDHC9YuKRiNwDDFiVXOidblED4u4BeuaT1nC9YuKRiNwAakmI5EwxAsiHdNqtbkwx4u4BeuaT3.wPcMqfeNwDAsiHdNqtbkmv17ER1nonWtCZbPaT1noPcMqfeNwI1liVXOidbkwnWtCZbPaT16QAZ=oDDHC9YuKRiNwDDFiVXOidblED4u4BeuaT1nC9YuKRiNwAdkmI5EwxAsiHdNqtbkwx4u4BeuaT3.wx0O49cNwDDG4HYu4bbkwx4u4BeuaT3.2=.Ewx.u4HcOqdWuaHblE=.E2D.u4HcOqdWuaHblE=.E2=.E2D0vqRjMadbkidgsiHAnohcOKRbEidgsiHAnoHetqR0uanWtAnDFWcbEidgsiHAnoHetqydNq9eNCRcMqDDEixbPq7eNwD0vq1jNC9bmKX1no9jMCxYsiT3.2=.E2=.EwPcMqfeNwDDN4JYuaNbkwVBf06c6eUhcmn17ER9euT1noxYNKHeNaT1noPcMqfeNwI.E2=1no1cNCVfOa9eNCT3.wx.tCxgNwI3'
- fname="test_930.xml"
+ fname=os.path.join(self.workdir, "test_930.xml")
with open(fname,"wb") as f:
f.write( pilot.FromBase64Swig(content_of_file) )