mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 19:41:36 +08:00
mavsdk_tests: print overall result
This commit is contained in:
@@ -156,6 +156,8 @@ def main():
|
|||||||
if not is_everything_ready():
|
if not is_everything_ready():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
overall_success = True
|
||||||
|
|
||||||
for group in test_matrix:
|
for group in test_matrix:
|
||||||
print("Running test group for '{}' with filter '{}'"
|
print("Running test group for '{}' with filter '{}'"
|
||||||
.format(group['model'], group['test_filter']))
|
.format(group['model'], group['test_filter']))
|
||||||
@@ -172,7 +174,10 @@ def main():
|
|||||||
test_runner.start(group)
|
test_runner.start(group)
|
||||||
|
|
||||||
returncode = test_runner.wait(group['timeout_min'])
|
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()
|
returncode = gazebo_runner.stop()
|
||||||
print("Gazebo exited with {}".format(returncode))
|
print("Gazebo exited with {}".format(returncode))
|
||||||
@@ -180,6 +185,10 @@ def main():
|
|||||||
px4_runner.stop()
|
px4_runner.stop()
|
||||||
print("PX4 exited with {}".format(returncode))
|
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__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user