<commit_before>#!/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<commit_msg>Integrationtests: updated script to properly handle log uploads<commit_after>#!/bin/bash
#
# Upload SITL CI logs to Flight Review
#
# License: according to LICENSE.md in the root directory of the PX4 Firmware repository

if [ -z "$WORKSPACE" ] || [ -z "${ghprbActualCommitAuthorEmail}" ] || [ -z "${ghprbPullDescription}" ]; then
    echo "Environment not set. Needs to be called from within Jenkins."
    exit 1
fi

echo "Uploading test logs to Flight Review"

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}" \
{'fraction_non_alphanumeric': 0.12312312312312312, 'fraction_numerical': 0.0037537537537537537, 'mean_word_length': 4.166666666666667, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7542848', 'n_tokens_mistral': 445, 'n_tokens_neox': 435, 'n_words': 153}