Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 5728c663 authored by Swann Perarnau's avatar Swann Perarnau
Browse files

Synchronize the tests code with current master

Given the recent changes in the yggdrasil code organization, most of the
tests were broken (bad imports mostly).

This commit fixes the tests so that we can run them against yggdrasil
master.
parent 7d9ec88d
...@@ -5,7 +5,7 @@ import os ...@@ -5,7 +5,7 @@ import os
import json import json
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.isengard import consts from yggdrasil import consts
class MPIComTest(FrameworkControler): class MPIComTest(FrameworkControler):
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.task_lib import Group from yggdrasil.task_lib import Group
from yggdrasil.task_lib import NumberedGroup from yggdrasil.task_lib import NumberedGroup
......
...@@ -10,7 +10,7 @@ import threading ...@@ -10,7 +10,7 @@ import threading
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.erebor import Erebor from yggdrasil.erebor import Erebor
from yggdrasil.isengard import consts from yggdrasil import consts
def flushprint(*args, **kwargs): def flushprint(*args, **kwargs):
print(*args, file=sys.stdout, **kwargs) print(*args, file=sys.stdout, **kwargs)
...@@ -85,7 +85,7 @@ class Grid5000GroupTest(FrameworkControler): ...@@ -85,7 +85,7 @@ class Grid5000GroupTest(FrameworkControler):
# spawn a network on each nodes # spawn a network on each nodes
network = self.erebor.networks.get(networkId) network = self.erebor.networks.get(networkId)
network.register_on_bridge_generic_messages(self.ping_receive) network.register_on_bridge_generic_messages(self.ping_receive)
spawned = network.spawned_list() spawned = network.connector.spawned_list()
i = 0 i = 0
self.to_wait_groups = len(spawned) -1 self.to_wait_groups = len(spawned) -1
for spawn in spawned : for spawn in spawned :
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import sys import sys
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.isengard import consts from yggdrasil import consts
class Grid5000SlowGroupTest(FrameworkControler): class Grid5000SlowGroupTest(FrameworkControler):
...@@ -43,7 +43,7 @@ class Grid5000SlowGroupTest(FrameworkControler): ...@@ -43,7 +43,7 @@ class Grid5000SlowGroupTest(FrameworkControler):
# spawn a network on each nodes # spawn a network on each nodes
network = self.erebor.networks.get(networkId) network = self.erebor.networks.get(networkId)
network.register_on_bridge_generic_messages(self.ping_receive) network.register_on_bridge_generic_messages(self.ping_receive)
spawned = network.spawned_list() spawned = network.connector.spawned_list()
i = 0 i = 0
self.to_wait_groups = len(spawned) -1 self.to_wait_groups = len(spawned) -1
for spawn in spawned : for spawn in spawned :
......
...@@ -10,7 +10,7 @@ import threading ...@@ -10,7 +10,7 @@ import threading
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.erebor import Erebor from yggdrasil.erebor import Erebor
from yggdrasil.isengard import consts from yggdrasil import consts
def flushprint(*args, **kwargs): def flushprint(*args, **kwargs):
print(*args, file=sys.stdout, **kwargs) print(*args, file=sys.stdout, **kwargs)
......
...@@ -3,7 +3,7 @@ import json ...@@ -3,7 +3,7 @@ import json
import getopt import getopt
import sys import sys
import zmq import zmq
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import MPIDecoder from yggdrasil.erebor import MPIDecoder
def runner(argv): def runner(argv):
......
...@@ -5,7 +5,7 @@ import os ...@@ -5,7 +5,7 @@ import os
import json import json
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.isengard import consts from yggdrasil import consts
class MPIComTest(FrameworkControler): class MPIComTest(FrameworkControler):
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
import os import os
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.task_lib import MPIJail from yggdrasil.task_lib import MPIJail
from yggdrasil.task_lib import MPIExecutor from yggdrasil.task_lib import MPIExecutor
......
...@@ -3,7 +3,7 @@ import json ...@@ -3,7 +3,7 @@ import json
import getopt import getopt
import sys import sys
import zmq import zmq
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import MPIDecoder from yggdrasil.erebor import MPIDecoder
def main(argv): def main(argv):
......
...@@ -8,7 +8,7 @@ import threading ...@@ -8,7 +8,7 @@ import threading
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.erebor import Erebor from yggdrasil.erebor import Erebor
from yggdrasil.isengard import consts from yggdrasil import consts
def flushprint(*args, **kwargs): def flushprint(*args, **kwargs):
print(*args, file=sys.stdout, **kwargs) print(*args, file=sys.stdout, **kwargs)
...@@ -48,7 +48,7 @@ class Sample(FrameworkControler): ...@@ -48,7 +48,7 @@ class Sample(FrameworkControler):
print("\n Erebor started on {} \n".format("4")) print("\n Erebor started on {} \n".format("4"))
# send a message to the erebor instance on 4, will only # send a message to the erebor instance on 4, will only
# be visible when logs are enabled # be visible when logs are enabled
network.send_message_to("4", "all", "coucou", False) network.connector.send_message_to("4", "all", "coucou", False)
# Will be called after the group/network nouveau is # Will be called after the group/network nouveau is
# started # started
......
...@@ -5,7 +5,7 @@ import os ...@@ -5,7 +5,7 @@ import os
import json import json
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.erebor import FrameworkControler from yggdrasil.erebor import FrameworkControler
from yggdrasil.isengard import consts from yggdrasil import consts
class MPIComTest(FrameworkControler): class MPIComTest(FrameworkControler):
......
...@@ -3,7 +3,7 @@ import json ...@@ -3,7 +3,7 @@ import json
import getopt import getopt
import sys import sys
import zmq import zmq
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import MPIDecoder from yggdrasil.erebor import MPIDecoder
def main(argv): def main(argv):
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import sys import sys
from yggdrasil.isengard import consts from yggdrasil import consts
from yggdrasil.erebor import runner from yggdrasil.erebor import runner
from yggdrasil.task_lib import Group from yggdrasil.task_lib import Group
from yggdrasil.task_lib import NumberedGroup from yggdrasil.task_lib import NumberedGroup
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment