=== modified file 'lava_dispatcher/__init__.py'
@@ -84,8 +84,8 @@
test_name = params.get('test_name', "Unknown")
err_msg = err_msg + "Lava failed with test: " \
+ test_name
- exc_type, exc_value, exc_traceback = sys.exc_info()
- err_msg = err_msg + repr(traceback.format_tb(exc_traceback))
+ err_msg = err_msg + traceback.format_exc()
+ print >> sys.stderr
print >> sys.stderr, err_msg
else:
err_msg = ""
=== modified file 'lava_dispatcher/actions/android_deploy.py'
@@ -22,7 +22,9 @@
from lava_dispatcher.actions import BaseAction
from lava_dispatcher.config import LAVA_IMAGE_TMPDIR, LAVA_IMAGE_URL, MASTER_STR
import os
+import sys
import shutil
+import traceback
from tempfile import mkdtemp
from lava_dispatcher.utils import download, download_with_cache
from lava_dispatcher.client import CriticalError
@@ -41,12 +43,16 @@
try:
client.wait_network_up()
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Network can't probe up when deployment")
try:
boot_tbz2, system_tbz2, data_tbz2 = self.download_tarballs(boot,
system, data, use_cache)
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Package can't download when deployment")
boot_tarball = boot_tbz2.replace(LAVA_IMAGE_TMPDIR, '')
@@ -65,6 +71,8 @@
self.deploy_linaro_android_testrootfs(system_url)
self.purge_linaro_android_sdcard()
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Android deployment failed")
finally:
shutil.rmtree(self.tarball_dir)
=== modified file 'lava_dispatcher/actions/deploy.py'
@@ -20,8 +20,10 @@
from commands import getoutput, getstatusoutput
import os
+import sys
import re
import shutil
+import traceback
from tempfile import mkdtemp
from lava_dispatcher.actions import BaseAction
@@ -43,12 +45,16 @@
try:
client.wait_network_up()
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Network can't probe up when deployment")
try:
boot_tgz, root_tgz = self.generate_tarballs(hwpack, rootfs,
use_cache)
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Deployment tarballs preparation failed")
boot_tarball = boot_tgz.replace(LAVA_IMAGE_TMPDIR, '')
root_tarball = root_tgz.replace(LAVA_IMAGE_TMPDIR, '')
@@ -60,6 +66,8 @@
self.deploy_linaro_rootfs(root_url)
self.deploy_linaro_bootfs(boot_url)
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise CriticalError("Deployment failed")
finally:
shutil.rmtree(self.tarball_dir)
@@ -124,6 +132,8 @@
rc, output = getstatusoutput(cmd)
if rc:
shutil.rmtree(tarball_dir)
+ tb = traceback.format_exc()
+ print >> sys.stderr, 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)
@@ -134,6 +144,8 @@
self._extract_partition(image_file, root_offset, root_tgz)
except:
shutil.rmtree(tarball_dir)
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise
return boot_tgz, root_tgz
=== modified file 'lava_dispatcher/actions/lava-test.py'
@@ -21,6 +21,8 @@
# with this program; if not, see <http://www.gnu.org/licenses>.
from datetime import datetime
+import sys
+import traceback
from lava_dispatcher.actions import BaseAction
from lava_dispatcher.client import OperationFailed
from lava_dispatcher.config import LAVA_RESULT_DIR, MASTER_STR, TESTER_STR
@@ -94,6 +96,8 @@
'chroot /mnt/root lava-test help',
response="list-tests", timeout=10)
except:
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
raise OperationFailed("lava-test deployment failed")
for test in tests: