From 339676a832152b0eaa86fa409d14986e1bca24ea Mon Sep 17 00:00:00 2001 From: Alexander Neben Date: Fri, 18 Nov 2022 20:07:00 +0000 Subject: SERVER-71471 Fixed deployment process for jstestfuzz (cherry picked from commit 45400e2540977847771a1172de82a01fb12ec8b4) --- evergreen/jstestfuzz_run.sh | 9 +++------ evergreen/jstestfuzz_setup.sh | 7 ------- evergreen/lint_fuzzer_sanity_all.sh | 4 +--- evergreen/lint_fuzzer_sanity_patch.sh | 4 +--- evergreen/prelude.sh | 15 --------------- 5 files changed, 5 insertions(+), 34 deletions(-) diff --git a/evergreen/jstestfuzz_run.sh b/evergreen/jstestfuzz_run.sh index 30e6ed36549..f65ef93b22e 100644 --- a/evergreen/jstestfuzz_run.sh +++ b/evergreen/jstestfuzz_run.sh @@ -1,11 +1,8 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)" . "$DIR/prelude.sh" -cd src/jstestfuzz - -set -o errexit -set -o verbose +set -evo pipefail -add_nodejs_to_path +cd src/jstestfuzz -eval npm run ${npm_command} -- ${jstestfuzz_vars} --branch ${branch_name} +eval ./src/scripts/npm_run.sh ${npm_command} -- ${jstestfuzz_vars} --branch ${branch_name} diff --git a/evergreen/jstestfuzz_setup.sh b/evergreen/jstestfuzz_setup.sh index f0d2b7a4c29..2d7e2a53cdc 100644 --- a/evergreen/jstestfuzz_setup.sh +++ b/evergreen/jstestfuzz_setup.sh @@ -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 diff --git a/evergreen/lint_fuzzer_sanity_all.sh b/evergreen/lint_fuzzer_sanity_all.sh index 91479f64964..810f595eb9d 100644 --- a/evergreen/lint_fuzzer_sanity_all.sh +++ b/evergreen/lint_fuzzer_sanity_all.sh @@ -6,8 +6,6 @@ cd src set -eo 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 -- +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 -- diff --git a/evergreen/lint_fuzzer_sanity_patch.sh b/evergreen/lint_fuzzer_sanity_patch.sh index 8f722b60694..ca9200bab38 100644 --- a/evergreen/lint_fuzzer_sanity_patch.sh +++ b/evergreen/lint_fuzzer_sanity_patch.sh @@ -6,8 +6,6 @@ cd src set -eo pipefail set -o verbose -add_nodejs_to_path - # Run parse-jsfiles on 50 files at a time with 32 processes in parallel. # Grep returns 1 if it fails to find a match. -(grep -v "\.tpl\.js$" modified_and_created_patch_files.txt | grep "\.js$" || true) | xargs -P 32 -L 50 npm run --prefix jstestfuzz parse-jsfiles -- +(grep -v "\.tpl\.js$" modified_and_created_patch_files.txt | grep "\.js$" || true) | xargs -P 32 -L 50 ./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz parse-jsfiles -- diff --git a/evergreen/prelude.sh b/evergreen/prelude.sh index abb0c6bce83..d41563b7b66 100755 --- a/evergreen/prelude.sh +++ b/evergreen/prelude.sh @@ -30,21 +30,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}") -- cgit v1.2.1