Commit 9c20234a authored by Ivan Tyagov's avatar Ivan Tyagov

Clean ups.

parent a0aa60de
...@@ -6,6 +6,7 @@ import argparse, sys, subprocess, os, glob ...@@ -6,6 +6,7 @@ import argparse, sys, subprocess, os, glob
import traceback import traceback
from erp5.util import taskdistribution from erp5.util import taskdistribution
import re import re
from time import gmtime, strftime
# pattern to get test counts from stdout # pattern to get test counts from stdout
SUMMARY_RE = re.compile( \ SUMMARY_RE = re.compile( \
...@@ -100,6 +101,7 @@ def main(): ...@@ -100,6 +101,7 @@ def main():
# run NEO tests # run NEO tests
test_result_line = test_result.start() test_result_line = test_result.start()
# XXX: add '-z' - i.e. ZODB tests when find out why it stalled execution. # XXX: add '-z' - i.e. ZODB tests when find out why it stalled execution.
args = [RUN_NEO_TESTS_COMMAND, '-ufv'] args = [RUN_NEO_TESTS_COMMAND, '-ufv']
command = ' '.join(args) command = ' '.join(args)
...@@ -118,11 +120,15 @@ def main(): ...@@ -118,11 +120,15 @@ def main():
command=command, command=command,
stderr=traceback.format_exc(), stderr=traceback.format_exc(),
stdout='') stdout='')
# XXX: inform test node master of error
raise EnvironmentError(result) raise EnvironmentError(result)
# parse test stdout / stderr, hint to speed up use files first! # parse test stdout / stderr, hint to speed up use files first!
stdout = p.stdout.read() stdout = p.stdout.read()
date = strftime("%Y/%m/%d %H:%M:%S", gmtime())
test_count, error_count, expected_count, skip_count, duration = parseTestStdOut(stdout) test_count, error_count, expected_count, skip_count, duration = parseTestStdOut(stdout)
# print to stdout so we can see in testnode logs
print test_result_line print test_result_line
print stdout print stdout
...@@ -133,10 +139,10 @@ def main(): ...@@ -133,10 +139,10 @@ def main():
failure_count = expected_count, failure_count = expected_count,
skip_count = skip_count, skip_count = skip_count,
duration = duration, duration = duration,
date = None, # XXX: date when test run or when finished ? date = date,
command = command, command = command,
stdout= stdout, stdout= stdout,
stderr='stderr', # XXX:catch it stderr= None,
html_test_result='') html_test_result='')
if __name__ == "__main__": 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