From 1f72068de3fc97ec27d3a01053232ed7772756e1 Mon Sep 17 00:00:00 2001 From: Andreas Antener <antener_a@gmx.ch> Date: Tue, 13 Dec 2016 09:56:03 +0100 Subject: [PATCH] Integrationtests: updated script to properly handle log uploads --- integrationtests/upload_test_logs.bash | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/integrationtests/upload_test_logs.bash b/integrationtests/upload_test_logs.bash index 0746da4f36..ad76461ede 100755 --- a/integrationtests/upload_test_logs.bash +++ b/integrationtests/upload_test_logs.bash @@ -1,23 +1,19 @@ #!/bin/bash # -# Run container and start test execution +# Upload SITL CI logs to Flight Review # # License: according to LICENSE.md in the root directory of the PX4 Firmware repository -if [ -z "$WORKSPACE" ]; then - echo "\$WORKSPACE not set" +if [ -z "$WORKSPACE" ] || [ -z "${ghprbActualCommitAuthorEmail}" ] || [ -z "${ghprbPullDescription}" ]; then + echo "Environment not set. Needs to be called from within Jenkins." 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" -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 +CMD="$WORKSPACE/Firmware/Tools/upload_log.py" +find "$WORKSPACE/test_results" -name \*.ulg -exec "$CMD" -q \ + --description "${ghprbPullDescription}" --source CI "{}" \; + +# XXX: move up if we want email notifications +# --email "${ghprbActualCommitAuthorEmail}" \ -- GitLab