Commit 50ebc09d authored by Kirill Smelkov's avatar Kirill Smelkov

Include envadj in report to master as well

We started to display command and envadj in the log in the previous
patch. However only command - without envadj - was reported to master
for test result. -> Make it uniform: include envadj into details
everywhere.
parent bd1333bb
......@@ -79,6 +79,13 @@ class TestCase:
self.kw = kw # **kw is passed to Popen
self.summaryf = summaryf # function to extract summary from test output
# command_str returns string representation of the command that test case runs.
# it returns something like 'make test.py # WENDELIN_CORE_TEST_DB=<fs>'
def command_str(t):
eadj = t.kw.get('envadj', {})
sadj = ' '.join(['%s=%s' % (k,eadj[k]) for k in sorted(eadj.keys())])
return '%s%s' % (' '.join(t.argv), ' # '+sadj if sadj else '')
# TestEnv represents a testing environment with set of TestCases to run.
class TestEnv:
def __init__(self):
......@@ -153,9 +160,7 @@ def main():
tstart = time()
print('\n>>> %s' % t.name)
eadj = t.kw.get('envadj', {})
sadj = ' '.join(['%s=%s' % (k,eadj[k]) for k in sorted(eadj.keys())])
print('$ %s%s' % (' '.join(t.argv), ' # '+sadj if sadj else ''))
print('$ %s' % t.command_str())
# default status dict
status = {
......@@ -218,7 +223,7 @@ def main():
# report result of test run back to master
test_result_line.stop(
command = ' '.join(t.argv),
command = t.command_str(),
duration = tend - tstart,
date = strftime("%Y/%m/%d %H:%M:%S", gmtime(tend)),
......
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