Skip to content

Commit 9ce99d3

Browse files
committed
NUM_CPU in run-fuzz
1 parent eb7f64f commit 9ce99d3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run-fuzz.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#!/bin/sh
22

3+
# This is for macOS.
4+
# For linux use: NUM_CPUS=$(awk '/^processor/ {++n} END {print n+1}' /proc/cpuinfo)
5+
NUM_CPUS=$(sysctl -n hw.ncpu)
6+
37
if [ "$1" == "" ]; then
48
cargo +nightly fuzz list
59
else
6-
cargo +nightly fuzz run $1 -- --stop-after-first-failure -max_len=200000
10+
cargo +nightly fuzz run $1 --jobs $NUM_CPUS -- --stop-after-first-failure -max_len=200000
711
fi

0 commit comments

Comments
 (0)