summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neben <alexander.neben@mongodb.com>2022-11-22 23:08:04 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-11-23 00:30:55 +0000
commit605d9ce64399c3222d07454521eb413d851430ba (patch)
tree566023e58ccdaf055156bee419058662874a6d84
parent589d28dbe5477fb34db6ad952bec094fcbd385a2 (diff)
downloadmongo-605d9ce64399c3222d07454521eb413d851430ba.tar.gz
SERVER-71534 Fixed fuzzer linting scripts
(cherry picked from commit abb9e2114622a4bf9052e5adfcaf28792ce189e9)
-rw-r--r--evergreen/lint_fuzzer_sanity_all.sh7
-rw-r--r--evergreen/lint_fuzzer_sanity_patch.sh13
2 files changed, 13 insertions, 7 deletions
diff --git a/evergreen/lint_fuzzer_sanity_all.sh b/evergreen/lint_fuzzer_sanity_all.sh
index 810f595eb9d..9c2159824e1 100644
--- a/evergreen/lint_fuzzer_sanity_all.sh
+++ b/evergreen/lint_fuzzer_sanity_all.sh
@@ -1,11 +1,14 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null 2>&1 && pwd)"
. "$DIR/prelude.sh"
-cd src
+cd src/jstestfuzz
set -eo pipefail
set -o verbose
+# Run first with help which will do the install
+# Then we can run it in parallel
+./src/scripts/npm_run.sh --help
# 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 ./jstestfuzz/src/scripts/npm_run.sh --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 ./src/scripts/npm_run.sh parse-jsfiles --
diff --git a/evergreen/lint_fuzzer_sanity_patch.sh b/evergreen/lint_fuzzer_sanity_patch.sh
index fa36b8dfbdb..af1afd63da7 100644
--- a/evergreen/lint_fuzzer_sanity_patch.sh
+++ b/evergreen/lint_fuzzer_sanity_patch.sh
@@ -8,11 +8,14 @@ set -o verbose
mkdir -p jstestfuzzinput jstestfuzzoutput
-indir="$(pwd)/jstestfuzzinput"
-outdir="$(pwd)/jstestfuzzoutput"
+# We need to be the jstestfuzz repo for node to install/run
+cd jstestfuzz
+
+indir="$(pwd)/../jstestfuzzinput"
+outdir="$(pwd)/../jstestfuzzoutput"
# Grep all the js files from modified_and_created_patch_files.txt and put them into $indir.
-(grep -v "\.tpl\.js$" modified_and_created_patch_files.txt | grep ".*jstests/.*\.js$" | xargs -I {} cp {} $indir || true)
+(grep -v "\.tpl\.js$" ../modified_and_created_patch_files.txt | grep ".*jstests/.*\.js$" | xargs -I {} cp {} $indir || true)
# Count the number of files in $indir.
if [[ "$(ls -A $indir)" ]]; then
@@ -23,8 +26,8 @@ if [[ "$(ls -A $indir)" ]]; then
num_files=50
fi
- ./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz jstestfuzz -- --jsTestsDir $indir --out $outdir --numSourceFiles $num_files --numGeneratedFiles 50
+ ./src/scripts/npm_run.sh 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 ./jstestfuzz/src/scripts/npm_run.sh --prefix jstestfuzz parse-jsfiles --
+ ls -1 -d $outdir/* | xargs -P 32 -L 50 ./src/scripts/npm_run.sh parse-jsfiles --
fi