mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-24 00:17:37 +01:00
SERVER-71471 Fixed deployment process for jstestfuzz
This commit is contained in:
parent
c64b56fae9
commit
45400e2540
@ -6,8 +6,6 @@ cd src/jstestfuzz
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
add_nodejs_to_path
|
||||
|
||||
if [ -f "../minimizer-outputs.json" ]; then
|
||||
eval npm run ${npm_command} -- -j "../minimizer-outputs.json"
|
||||
eval ./src/scripts/npm_run.sh ${npm_command} -- -j "../minimizer-outputs.json"
|
||||
fi
|
||||
|
@ -1,13 +1,10 @@
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
|
||||
. "$DIR/prelude.sh"
|
||||
|
||||
set -evo pipefail
|
||||
|
||||
cd src/jstestfuzz
|
||||
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
add_nodejs_to_path
|
||||
|
||||
in_patch_build_flag=""
|
||||
if [[ "${is_patch}" = "true" ]]; then
|
||||
case "${npm_command}" in
|
||||
@ -17,4 +14,4 @@ if [[ "${is_patch}" = "true" ]]; then
|
||||
esac
|
||||
fi
|
||||
|
||||
eval npm run "${npm_command}" -- "${jstestfuzz_vars}" "${in_patch_build_flag}" --branch "${branch_name}"
|
||||
./src/scripts/npm_run.sh ${npm_command} -- ${jstestfuzz_vars} ${in_patch_build_flag} --branch ${branch_name}
|
||||
|
@ -6,11 +6,4 @@ cd src
|
||||
set -o errexit
|
||||
set -o verbose
|
||||
|
||||
add_nodejs_to_path
|
||||
|
||||
git clone git@github.com:10gen/jstestfuzz.git
|
||||
|
||||
pushd jstestfuzz
|
||||
npm install
|
||||
npm run prepare
|
||||
popd
|
||||
|
@ -6,11 +6,9 @@ cd src
|
||||
set -o pipefail
|
||||
set -o verbose
|
||||
|
||||
add_nodejs_to_path
|
||||
|
||||
# Run parse-jsfiles on 50 files at a time with 32 processes in parallel.
|
||||
# Skip javascript files in third_party directory
|
||||
find "$PWD/jstests" "$PWD/src/mongo/db/modules/enterprise" -path "$PWD/jstests/third_party" -prune -o -name "*.js" -print | xargs -P 32 -L 50 npm run --prefix jstestfuzz parse-jsfiles -- | tee lint_fuzzer_sanity.log
|
||||
find "$PWD/jstests" "$PWD/src/mongo/db/modules/enterprise" -path "$PWD/jstests/third_party" -prune -o -name "*.js" -print | xargs -P 32 -L 50 ./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz parse-jsfiles -- | tee lint_fuzzer_sanity.log
|
||||
exit_code=$?
|
||||
|
||||
activate_venv
|
||||
|
@ -7,7 +7,6 @@ set -o pipefail
|
||||
set -o verbose
|
||||
|
||||
activate_venv
|
||||
add_nodejs_to_path
|
||||
|
||||
mkdir -p jstestfuzzinput jstestfuzzoutput
|
||||
|
||||
@ -26,10 +25,10 @@ if [[ "$(ls -A $indir)" ]]; then
|
||||
num_files=50
|
||||
fi
|
||||
|
||||
npm run --prefix jstestfuzz jstestfuzz -- --jsTestsDir $indir --out $outdir --numSourceFiles $num_files --numGeneratedFiles 50
|
||||
./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz jstestfuzz -- --jsTestsDir $indir --out $outdir --numSourceFiles $num_files --numGeneratedFiles 50
|
||||
|
||||
# Run parse-jsfiles on 50 files at a time with 32 processes in parallel.
|
||||
ls -1 -d $outdir/* | xargs -P 32 -L 50 npm run --prefix jstestfuzz parse-jsfiles -- | tee lint_fuzzer_sanity.log
|
||||
ls -1 -d $outdir/* | xargs -P 32 -L 50 ./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz parse-jsfiles -- | tee lint_fuzzer_sanity.log
|
||||
exit_code=$?
|
||||
$python ./buildscripts/simple_report.py --test-name lint_fuzzer_sanity_patch --log-file lint_fuzzer_sanity.log --exit-code $exit_code
|
||||
fi
|
||||
|
@ -32,21 +32,6 @@ unset expansions_default_yaml
|
||||
unset script
|
||||
unset evergreen_dir
|
||||
|
||||
function add_nodejs_to_path {
|
||||
# Add node and npm binaries to PATH
|
||||
if [ "Windows_NT" = "$OS" ]; then
|
||||
# An "npm" directory might not have been created in %APPDATA% by the Windows installer.
|
||||
# Work around the issue by specifying a different %APPDATA% path.
|
||||
# See: https://github.com/nodejs/node-v0.x-archive/issues/8141
|
||||
export APPDATA=${workdir}/npm-app-data
|
||||
export PATH="$PATH:/cygdrive/c/Program Files (x86)/nodejs" # Windows location
|
||||
# TODO: this is to work around BUILD-8652
|
||||
cd "$(pwd -P | sed 's,cygdrive/c/,cygdrive/z/,')"
|
||||
else
|
||||
export PATH="$PATH:/opt/node/bin"
|
||||
fi
|
||||
}
|
||||
|
||||
function posix_workdir {
|
||||
if [ "Windows_NT" = "$OS" ]; then
|
||||
echo $(cygpath -u "${workdir}")
|
||||
|
Loading…
Reference in New Issue
Block a user