SITL CI: gracefully fail tests early (#5405)

This commit is contained in:
Andreas Daniel Antener 2016-08-28 21:56:31 +02:00 committed by Lorenz Meier
parent 15e50b26dc
commit 02029882db
1 changed files with 5 additions and 4 deletions

View File

@ -83,11 +83,12 @@ echo -e "ROS_LOG_DIR\t\t: $ROS_LOG_DIR"
echo -e "PX4_LOG_DIR\t\t: $PX4_LOG_DIR"
echo -e "TEST_RESULT_TARGET_DIR\t: $TEST_RESULT_TARGET_DIR"
# Exit on first error as we cannot afford to wait forever
set -e
# don't exit on error anymore (because single tests or exports might fail)
# however, stop executing tests after the first failure
set +e
echo "=====> run tests"
rostest px4 mavros_posix_tests_iris.launch
rostest px4 mavros_posix_tests_standard_vtol.launch
test $? -eq 0 && rostest px4 mavros_posix_tests_iris.launch
test $? -eq 0 && rostest px4 mavros_posix_tests_standard_vtol.launch
TEST_RESULT=$?
echo "<====="