Commit 7d9ec88d authored by lavocat's avatar lavocat
Browse files

Follow code update on project yggdrasil

Due to the new arg parsing and base64 encoding, the tests need to follow
the evolution.
parent a1be4111
......@@ -54,7 +54,7 @@ echo
echo -- Testing basic sample :
time tests/sample.py > regression/sample_test
echo
if diff <(sed "/uptime/d" <(sort regression/sample_base)) <(sed "/uptime/d" <(sort regression/sample_test))
if diff <(sed "/stderr/d" <(sort regression/sample_base)) <(sed "/stderr/d" <(sort regression/sample_test))
then
echo sample OK
rm regression/sample_test
......@@ -66,7 +66,7 @@ echo
echo
echo -- Testing broadcast :
time 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 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 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
......
#!/usr/bin/env python3
import base64
import sys
import os
import json
......@@ -92,13 +93,16 @@ class MPIComTest(FrameworkControler):
decoded = json.loads(data)
value = decoded["stderr"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("error >")[1]
print ("{} {} : {}".format(prefix, "stderr", line))
value = decoded["stdout"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("output >")[1]
print ("{} {} : {}".format(prefix, "stdout", line))
print ("{} {} : {}".format(prefix, "status", decoded["status"]))
print ("{} {} : {}".format(prefix, "status",
base64.b64decode(decoded["status"]).decode(consts.encoding)))
def decision_to_end(self) :
self.global_wait -= 1
......
#!/usr/bin/env python3
import base64
import sys
import os
import json
......@@ -92,13 +93,16 @@ class MPIComTest(FrameworkControler):
decoded = json.loads(data)
value = decoded["stderr"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("error >")[1]
print ("{} {} : {}".format(prefix, "stderr", line))
value = decoded["stdout"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("output >")[1]
print ("{} {} : {}".format(prefix, "stdout", line))
print ("{} {} : {}".format(prefix, "status", decoded["status"]))
print ("{} {} : {}".format(prefix, "status",
base64.b64decode(decoded["status"]).decode(consts.encoding)))
def decision_to_end(self) :
self.global_wait -= 1
......
#!/usr/bin/env python3
import base64
import sys
import os
import json
......@@ -54,13 +55,16 @@ class MPIComTest(FrameworkControler):
decoded = json.loads(data)
value = decoded["stderr"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("error >")[1]
print ("{} : {}".format("stderr", line))
value = decoded["stdout"]
for line in value :
line = base64.b64decode(line).decode(consts.encoding)
line = line.split("output >")[1]
print ("{} : {}".format("stdout", line))
print ("{} : {}".format("status", decoded["status"]))
print ("{} : {}".format("status",
base64.b64decode(decoded["status"]).decode(consts.encoding)))
self.erebor.terminate()
self.close()
......
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