mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
Integrationtests: updated script to properly handle log uploads
This commit is contained in:
@@ -1,23 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/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
|
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository
|
||||||
|
|
||||||
if [ -z "$WORKSPACE" ]; then
|
if [ -z "$WORKSPACE" ] || [ -z "${ghprbActualCommitAuthorEmail}" ] || [ -z "${ghprbPullDescription}" ]; then
|
||||||
echo "\$WORKSPACE not set"
|
echo "Environment not set. Needs to be called from within Jenkins."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# determine the directory of the source given the directory of this script
|
echo "Uploading test logs to Flight Review"
|
||||||
pushd `dirname $0` > /dev/null
|
|
||||||
SCRIPTPATH=`pwd`
|
|
||||||
popd > /dev/null
|
|
||||||
ORIG_SRC=$(dirname $SCRIPTPATH)
|
|
||||||
|
|
||||||
echo "uploading test logs to Flight Review"
|
CMD="$WORKSPACE/Firmware/Tools/upload_log.py"
|
||||||
for LOG in `ls $WORKSPACE/test_results/**/*.ulg`
|
find "$WORKSPACE/test_results" -name \*.ulg -exec "$CMD" -q \
|
||||||
do
|
--description "${ghprbPullDescription}" --source CI "{}" \;
|
||||||
LINK=`$ORIG_SRC/Tools/upload_log.py -q --source CI $LOG`
|
|
||||||
echo "Test log: $LINK"
|
# XXX: move up if we want email notifications
|
||||||
done
|
# --email "${ghprbActualCommitAuthorEmail}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user