mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-18 20:49:05 +08:00
mavsdk_tests: print overall result
This commit is contained in:
parent
dde7530df6
commit
90c79493f2
@ -156,6 +156,8 @@ def main():
|
||||
if not is_everything_ready():
|
||||
return
|
||||
|
||||
overall_success = True
|
||||
|
||||
for group in test_matrix:
|
||||
print("Running test group for '{}' with filter '{}'"
|
||||
.format(group['model'], group['test_filter']))
|
||||
@ -172,7 +174,10 @@ def main():
|
||||
test_runner.start(group)
|
||||
|
||||
returncode = test_runner.wait(group['timeout_min'])
|
||||
print("Test exited with {}".format(returncode))
|
||||
was_success = (returncode == 0)
|
||||
print("Test group: {}".format("Success" if was_success else "Fail"))
|
||||
if not was_success:
|
||||
overall_success = False
|
||||
|
||||
returncode = gazebo_runner.stop()
|
||||
print("Gazebo exited with {}".format(returncode))
|
||||
@ -180,6 +185,10 @@ def main():
|
||||
px4_runner.stop()
|
||||
print("PX4 exited with {}".format(returncode))
|
||||
|
||||
print("Overall result: {}".
|
||||
format("SUCCESS" if overall_success else "FAIL"))
|
||||
return 0 if overall_success else 1
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user