Browse Source

autotest: print stack traces when exceptions caught

c415-sdk
Peter Barker 4 years ago committed by Peter Barker
parent
commit
65cffdad5a
  1. 3
      Tools/autotest/ardusub.py
  2. 15
      Tools/autotest/rover.py

3
Tools/autotest/ardusub.py

@ -267,7 +267,8 @@ class AutoTestSub(AutoTest): @@ -267,7 +267,8 @@ class AutoTestSub(AutoTest):
self.mavproxy.expect("Gripper Grabbed")
self.mavproxy.expect("Gripper Released")
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
if ex is not None:
raise ex

15
Tools/autotest/rover.py

@ -618,7 +618,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -618,7 +618,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
self.set_rc(8, 1700) # PWM for mode5
self.wait_mode("ACRO")
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
@ -659,7 +660,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -659,7 +660,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
self.wait_mode("ACRO")
self.set_rc(9, 1000)
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
@ -1065,7 +1067,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -1065,7 +1067,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
self.wait_rc_channel_value(3, normal_rc_throttle, timeout=10)
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
@ -1115,7 +1118,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -1115,7 +1118,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
self.disarm_vehicle()
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
if ex is not None:
@ -1175,7 +1179,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm) @@ -1175,7 +1179,8 @@ Brakes have negligible effect (with=%0.2fm without=%0.2fm delta=%0.2fm)
raise comp_arm_exception
except Exception as e:
self.progress("Exception caught")
self.progress("Exception caught: %s" % (
self.get_exception_stacktrace(e)))
ex = e
self.context_pop()
if ex is not None:

Loading…
Cancel
Save