Commit 2a808e97 authored by zhifan huang's avatar zhifan huang

Merge branch 're6st-test' into name_test

parents 728aae8f 424ec5c9
......@@ -30,4 +30,4 @@ md5sum = feb4b3318f37414d1bf3d16a03aec93d
[template-runTestSuite]
filename = run-unit-test.in
md5sum = 39043b4a94159fe0846db1c5f44280e8
md5sum = e2572344a6661fc66efb7c802dd12aa9
......@@ -49,7 +49,19 @@ def main():
args = parser.parse_args()
test_suite_title = args.test_suite_title or args.test_suite
test_name_list = ['Registry']
command = [RUN_RE6ST_TESTS]
p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate()
# result = out.replace("'", '"')
result= json.loads(out)
test_name_list = list(result)
# print to stdout so we can see in testnode logs
sys.stdout.write(out)
sys.stderr.write(err)
if args.master_url:
tool = taskdistribution.TaskDistributor(portal_url = args.master_url)
......@@ -64,31 +76,16 @@ def main():
if test_result is None:
return
while 1:
test_result_line = test_result.start()
if not test_result_line:
break
command = [RUN_RE6ST_TESTS]
p = subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
out, err = p.communicate()
result = out.replace("'", '"')
status_dict = json.loads(result)
end = time.time()
start = time.time()
# print to stdout so we can see in testnode logs
sys.stdout.write(out)
sys.stderr.write(err)
for case in test_name_list:
test_result_line = test_result.start()
# report status back to Nexedi ERP5
test_result_line.stop(
command = command,
date = time.strftime("%Y/%m/%d %H:%M:%S", time.gmtime(end)),
stderr=err,
stdout=out,
**status_dict)
**result[case])
if __name__ == "__main__":
......
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