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 d6ba3161 authored by lavocat's avatar lavocat
Browse files

Make all tests pass without launcher

Use Yggdrasil when it's installed on the computer via PIP.
./regresseion.sh will allow to test the program.
parent e371bf5b
#!/bin/bash
base=$PWD
export PATH=$PATH:$base:$base/isengard:$base/erebor:$base/task_lib
export PYTHONPATH=$base:$base/isengard:$base/erebor:$base/task_lib
echo -------------------------------------------------------------------------
echo -- INIT LAUNCHER
echo -------------------------------------------------------------------------
if command -v taktuk >/dev/null; then
echo taktuk is installed
else
s=0
for i in "$@" ; do
if [[ $i == "-P" ]] ; then
s=1
fi
done
if [[ $s == 0 ]] ; then
echo taktuk is not installed, specify its path with option -P
echo or install it with 'sudo aptitude install taktuk'
exit -1
fi
fi
base=$(pwd)
pgm="$1"
shift
echo -------------------------------------------------------------------------
echo -- START
echo -------------------------------------------------------------------------
./$pgm -p $base $@
#!/bin/bash
echo
echo -- Testing packing :
if ./launcher ./erebor/encoder.py
then
echo packing OK
else
echo packing NOK
exit 1
fi
#echo
#echo -- Testing packing :
#
#if ./erebor/encoder.py
#then
# echo packing OK
#else
# echo packing NOK
# exit 1
#fi
echo
echo -- Testing failing groups :
time ./launcher tests/fail_group.py > regression/fail_group_test
time tests/fail_group.py > regression/fail_group_test
echo
if diff <(sort regression/fail_group_base) <(sort regression/fail_group_base)
then
......@@ -26,7 +26,7 @@ fi
echo
echo -- Testing basic task processor :
time ./launcher tests/simple_task.py > regression/simple_task_test
time tests/simple_task.py > regression/simple_task_test
echo
if diff <(sed "/.*[B|A]-/d" <(sort regression/simple_task_base)) <(sed "/.*[B|A]-/d" <(sort regression/simple_task_test))
then
......@@ -39,7 +39,7 @@ fi
echo
echo -- Testing mpi jail:
time ./launcher tests/mpi_jail_task.py > regression/mpi_jail_task_test
time tests/mpi_jail_task.py > regression/mpi_jail_task_test
echo
if diff <(sed "/status/d" <(sort regression/mpi_jail_task_base)) <(sed "/status/d" <(sort regression/mpi_jail_task_test))
then
......@@ -52,7 +52,7 @@ fi
echo
echo -- Testing basic sample :
time ./launcher tests/sample.py > regression/sample_test
time tests/sample.py > regression/sample_test
echo
if diff <(sed "/uptime/d" <(sort regression/sample_base)) <(sed "/uptime/d" <(sort regression/sample_test))
then
......@@ -66,7 +66,7 @@ echo
echo
echo -- Testing broadcast :
time ./launcher tests/grid5ktest.py --host-list=A,A,A,A > regression/grid5ktest_test
time tests/grid5ktest.py --host-list=A,A,A,A > regression/grid5ktest_test
echo
if diff <(sed "/done/d" <(sort regression/grid5ktest_test)) <(sed "/done/d" <(sort regression/grid5ktest_base))
then
......@@ -80,7 +80,7 @@ echo
echo
echo -- Testing replication :
time ./launcher tests/grid5kSlowGrouptest.py --host-list=A,A,A,A > regression/grid5kSlowGrouptest_test
time tests/grid5kSlowGrouptest.py --host-list=A,A,A,A > regression/grid5kSlowGrouptest_test
echo
if diff <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kSlowGrouptest_test))) <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kSlowGrouptest_base)))
then
......@@ -94,7 +94,7 @@ echo
echo
echo -- Testing replication and routing :
time ./launcher tests/grid5kGrouptest.py --host-list=A,A,A,A > regression/grid5kGrouptest_test
time tests/grid5kGrouptest.py --host-list=A,A,A,A > regression/grid5kGrouptest_test
echo
if diff <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kGrouptest_test))) <( sed '/{.*}/d' <(sed "/to wait/d" <(sort regression/grid5kGrouptest_base)))
then
......@@ -108,7 +108,7 @@ echo
echo
echo -- Testing simple emulated mpi communications :
time ./launcher tests/simple_mpi_communicator_test.py > regression/simple_mpi_test
time tests/simple_mpi_communicator_test.py > regression/simple_mpi_test
echo
if diff <(sed "/with status/d" <(sort regression/simple_mpi_test)) <(sed "/with status/d" <(sort regression/simple_mpi_base))
then
......@@ -122,7 +122,7 @@ echo
echo
echo -- Testing emulated mpi communications :
time ./launcher tests/mpi_communicator_test.py > regression/mpi_test
time tests/mpi_communicator_test.py > regression/mpi_test
echo
if diff <(sed "/with status/d" <(sort regression/mpi_test)) <(sed "/with status/d" <(sort regression/mpi_base))
then
......@@ -135,7 +135,7 @@ fi
echo
echo -- Testing emulated mpi communications with C programms:
time ./launcher tests/c_communicator_test.py > regression/c_communicator_test_test
time tests/c_communicator_test.py > regression/c_communicator_test_test
echo
if diff <(sed "/with status/d" <(sort regression/c_communicator_test_test)) <(sed "/with status/d" <(sort regression/c_communicator_test_base))
then
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
processor start
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
processor start
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
......
-------------------------------------------------------------------------
-- INIT LAUNCHER
-------------------------------------------------------------------------
taktuk is installed
-------------------------------------------------------------------------
-- START
-------------------------------------------------------------------------
start
path None
processor start
......
......@@ -44,7 +44,7 @@ class MPIComTest(FrameworkControler):
# make it start a mpi session
def mpi_session_started(data) :
print("executing the client")
cmd = os.environ["PWD"]+"/../c_wrapper/server"
cmd = os.environ["PWD"]+"/c_wrapper/server"
command = "{} -N {} -P 6000 -C {}".format(cmd, "server", (nb_jobs*nb_process))
self.exec_on("0", command, consts.TRUE, "0", "server", "0", "root", self.server_end)
for i in range(0, nb_jobs) :
......@@ -57,7 +57,7 @@ class MPIComTest(FrameworkControler):
def start_clients(self, nb_process, port_server, rank) :
i = int(rank)
cmd = os.environ["PWD"]+"/../c_wrapper/client"
cmd = os.environ["PWD"]+"/c_wrapper/client"
port_client = int(port_server + ((i+1)*nb_process))
port_client += 1
group_name = "client{}".format(i)
......
......@@ -15,7 +15,7 @@ class Sample(TaskProcessor):
nb_clients = 10
g1 = MPIJail("jail_server", 'server', '', '0', 'root')
server_jail = MPIExecutor('s1',
os.environ["PWD"]+"/../c_wrapper/server -C {}".format(nb_clients),
os.environ["PWD"]+"/c_wrapper/server -C {}".format(nb_clients),
g1, True)
server_jail.add_dependency_conjunction({g1:consts.RUNING}, True)
self.tasks.append(g1)
......@@ -23,7 +23,7 @@ class Sample(TaskProcessor):
for i in range(0, nb_clients) :
gc = MPIJail("jail_client{}".format(i), "client{}".format(i), '', '0', 'root')
client_jail = MPIExecutor("mpi_executor{}".format(i),
os.environ["PWD"]+"/../c_wrapper/client -R 1 -S {}".format("server"),
os.environ["PWD"]+"/c_wrapper/client -R 1 -S {}".format("server"),
gc,True)
client_jail.add_dependency_conjunction(
{gc:consts.RUNING,server_jail:consts.RUNING}, True)
......
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