From 14f75bc8a3b9b6af44cf3a6cb9eaadb86eaf0b56 Mon Sep 17 00:00:00 2001 From: Andreas Antener Date: Mon, 12 Dec 2016 22:40:53 +0100 Subject: [PATCH] SITL CI: Remove log upload from test script and move into separate one --- integrationtests/run_tests.bash | 7 ------- integrationtests/upload_test_logs.bash | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) create mode 100755 integrationtests/upload_test_logs.bash diff --git a/integrationtests/run_tests.bash b/integrationtests/run_tests.bash index 924e68d457..a74fbd1716 100755 --- a/integrationtests/run_tests.bash +++ b/integrationtests/run_tests.bash @@ -107,13 +107,6 @@ cp -r $ROS_LOG_DIR/* ${TEST_RESULT_TARGET_DIR} cp -r $PX4_LOG_DIR/* ${TEST_RESULT_TARGET_DIR} # cp $BAGS/*.bag ${TEST_RESULT_TARGET_DIR}/ # cp -r $CHARTS ${TEST_RESULT_TARGET_DIR}/ - -echo "uploading test logs to Flight Review" -for LOG in `ls $PX4_LOG_DIR/**/*.ulg` -do - LINK=`$SRC_DIR/Tools/upload_log.py -q --source CI $LOG` - echo "Test log: $LINK" -done echo "<=====" # need to return error if tests failed, else Jenkins won't notice the failure diff --git a/integrationtests/upload_test_logs.bash b/integrationtests/upload_test_logs.bash new file mode 100755 index 0000000000..0746da4f36 --- /dev/null +++ b/integrationtests/upload_test_logs.bash @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Run container and start test execution +# +# License: according to LICENSE.md in the root directory of the PX4 Firmware repository + +if [ -z "$WORKSPACE" ]; then + echo "\$WORKSPACE not set" + exit 1 +fi + +# determine the directory of the source given the directory of this script +pushd `dirname $0` > /dev/null +SCRIPTPATH=`pwd` +popd > /dev/null +ORIG_SRC=$(dirname $SCRIPTPATH) + +echo "uploading test logs to Flight Review" +for LOG in `ls $WORKSPACE/test_results/**/*.ulg` +do + LINK=`$ORIG_SRC/Tools/upload_log.py -q --source CI $LOG` + echo "Test log: $LINK" +done