Salome HOME
Go on
[modules/yacs.git] / src / yacsloader / testCppPluginInvokation.py
index 018758f1ec3c13cea97834368dea3733b80faaf5..ac7b4c800e2e5b2c75754820d17e871c2cfeef1c 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python3
-# Copyright (C) 2018  CEA/DEN, EDF R&D
+# Copyright (C) 2018-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
@@ -49,6 +49,8 @@ o2=node2.edAddOutputPort("o2",ti)
 node1.edAddChild(node2)
 p.edAddLink(node1.edGetSamplePort(),i1)
 
+p.saveSchema("thomas.xml")
+
 ex=pilot.ExecutorSwig()
 assert(p.getState()==pilot.READY)
 pilot.LoadObserversPluginIfAny(p,ex)
@@ -56,3 +58,15 @@ ex.RunW(p,0)
 assert(p.getState()==pilot.DONE)
 pilot.UnLoadObserversPluginIfAny()
 
+
+for i in range(100):
+    print(30*"*"+" %d"%i)
+    l=loader.YACSLoader()
+    p=l.load("thomas.xml")
+    ex=pilot.ExecutorSwig()
+    assert(p.getState()==pilot.READY)
+    pilot.LoadObserversPluginIfAny(p,ex)
+    ex.RunW(p,0)
+    assert(p.getState()==pilot.DONE)
+    pilot.UnLoadObserversPluginIfAny()
+