=== modified file 'lava_dispatcher/__init__.py'
@@ -85,8 +85,8 @@
err_msg = err_msg + "Lava failed with test: " \
+ test_name
err_msg = err_msg + traceback.format_exc()
- print >> sys.stderr
- print >> sys.stderr, err_msg
+ # output to both serial log and logfile
+ self.context.client.sio.write(err_msg)
else:
err_msg = ""
self.context.test_data.add_result(cmd['command'],
=== modified file 'lava_dispatcher/actions/android_deploy.py'
@@ -44,7 +44,7 @@
client.wait_network_up()
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Network can't probe up when deployment")
try:
@@ -52,7 +52,7 @@
system, data, use_cache)
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Package can't download when deployment")
boot_tarball = boot_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
@@ -72,7 +72,7 @@
self.purge_linaro_android_sdcard()
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Android deployment failed")
finally:
shutil.rmtree(self.tarball_dir)
=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -46,7 +46,7 @@
client.wait_network_up()
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Network can't probe up when deployment")
try:
@@ -54,7 +54,7 @@
use_cache)
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Deployment tarballs preparation failed")
boot_tarball = boot_tgz.replace(LAVA_IMAGE_TMPDIR, '')
root_tarball = root_tgz.replace(LAVA_IMAGE_TMPDIR, '')
@@ -67,7 +67,7 @@
self.deploy_linaro_bootfs(boot_url)
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise CriticalError("Deployment failed")
finally:
shutil.rmtree(self.tarball_dir)
@@ -133,7 +133,7 @@
if rc:
shutil.rmtree(tarball_dir)
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise RuntimeError("linaro-media-create failed: %s" % output)
boot_offset = self._get_partition_offset(image_file, board.boot_part)
root_offset = self._get_partition_offset(image_file, board.root_part)
@@ -145,7 +145,7 @@
except:
shutil.rmtree(tarball_dir)
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise
return boot_tgz, root_tgz
=== modified file 'lava_dispatcher/actions/lava-test.py'
@@ -97,7 +97,7 @@
response="list-tests", timeout=10)
except:
tb = traceback.format_exc()
- print >> sys.stderr, tb
+ client.sio.write(tb)
raise OperationFailed("lava-test deployment failed")
for test in tests: