0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-24 00:17:37 +01:00
mongodb/evergreen/run_python_script_with_report.sh
Trevor Guidry ae750204a5 SERVER-96047 move linters out of scons (#28323)
GitOrigin-RevId: 23c85b6bc1e0b32a295d7a860e2a5f5da3b9025c
2024-10-22 19:17:19 +00:00

23 lines
620 B
Bash

unset workdir
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
set -o verbose
cd src
# Get the name of the test to be included in the report
report_test_name="$1"
# Shift the args so "$@" will unwind only the args to be passed to the python process
shift
activate_venv
echo $python $@
echo $python $@ > python_report.log
$python "$@" &>> python_report.log
exit_code=$?
echo "Finished with exit code: $exit_code" >> python_report.log
$python ./buildscripts/simple_report.py --test-name "${report_test_name}" --log-file python_report.log --exit-code $exit_code
exit $exit_code