0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-28 16:24:56 +01:00
mongodb/evergreen/scons_lint.sh
Zack Winter bd01a61df2 SERVER-86713 Add EngFlow creds setup to linter and formatter tasks (#19070)
GitOrigin-RevId: b34e71f9fe85a89621e7194c09c496e89d05e4c9
2024-02-16 19:41:34 +00:00

30 lines
884 B
Bash
Executable File

DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
cd src
set -o pipefail
set -o verbose
activate_venv
export MYPY="$(
if which cygpath 2> /dev/null; then
PATH+=":$(cypath "${workdir}")/venv_3/Scripts"
else
PATH+=":${workdir}/venv_3/bin"
fi
PATH+=':/opt/mongodbtoolchain/v4/bin'
which mypy
)"
echo "Found mypy executable at '$MYPY'"
echo "Setting evergreen tmp dir to $TMPDIR"
compile_flags="$compile_flags --evergreen-tmp-dir='${TMPDIR}'"
export extra_flags=""
eval ${compile_env} python3 ./buildscripts/scons.py ${compile_flags} $extra_flags --stack-size=1024 GITDIFFFLAGS="${revision}" REVISION="${revision}" ENTERPRISE_REV="${enterprise_rev}" ${targets} | tee scons-lint.log
exit_code=$?
$python ./buildscripts/simple_report.py --test-name "${targets}" --log-file scons-lint.log --exit-code $exit_code
exit $exit_code