Skip to content

Commit 5ad9d33

Browse files
committed
Added proper verbose for test output
1 parent 34e19e3 commit 5ad9d33

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

workspace_tools/singletest.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,14 @@ def handle(self, test_spec, target_name, toolchain_name):
242242
# Host test execution
243243
start_host_exec_time = time()
244244
#test_result = self.run_simple_test(target_name, port, duration, verbose=opts.verbose)
245-
test_result = self.run_host_test(test.host_test, disk, port, duration)
245+
test_result = self.run_host_test(test.host_test, disk, port, duration, opts.verbose)
246246
elapsed_time = time() - start_host_exec_time
247247
print print_test_result(test_result, target_name, toolchain_name,
248248
test_id, test_description, elapsed_time, duration)
249249
return (test_result, target_name, toolchain_name,
250250
test_id, test_description, round(elapsed_time, 2), duration)
251251

252-
def run_host_test(self, name, disk, port, duration, extra_serial=""):
252+
def run_host_test(self, name, disk, port, duration, verbose=False, extra_serial=""):
253253
# print "{%s} port:%s disk:%s" % (name, port, disk),
254254
cmd = ["python", "%s.py" % name, '-p', port, '-d', disk, '-t', str(duration), "-e", extra_serial]
255255
proc = Popen(cmd, stdout=PIPE, cwd=HOST_TESTS)
@@ -284,6 +284,12 @@ def run_host_test(self, name, disk, port, duration, extra_serial=""):
284284
# Stop test process
285285
obs.stop()
286286

287+
# Handle verbose mode
288+
if verbose:
289+
print "Test::Output::Start"
290+
print "".join(output)
291+
print "Test::Output::Finish"
292+
287293
# Parse test 'output' data
288294
result = self.TEST_RESULT_UNDEF
289295
for line in "".join(output).splitlines():

0 commit comments

Comments
 (0)