From 02029882db9fb7357ee96b8e3f59cad0abf6289e Mon Sep 17 00:00:00 2001
From: Andreas Daniel Antener <antener_a@gmx.ch>
Date: Sun, 28 Aug 2016 21:56:31 +0200
Subject: [PATCH] SITL CI: gracefully fail tests early (#5405)

---
 integrationtests/run_tests.bash | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/integrationtests/run_tests.bash b/integrationtests/run_tests.bash
index 4483ee3dd5..a74fbd1716 100755
--- a/integrationtests/run_tests.bash
+++ b/integrationtests/run_tests.bash
@@ -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 "<====="
 
-- 
GitLab