From 62415c0d1530f271ce9d417fa075ac00b9473f1e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Mon, 23 Oct 2023 13:05:15 -0400 Subject: tests: Document -j --- tests/getopts.sh | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) (limited to 'tests') diff --git a/tests/getopts.sh b/tests/getopts.sh index d34df4f..ac75140 100644 --- a/tests/getopts.sh +++ b/tests/getopts.sh @@ -5,14 +5,32 @@ ## Argument parsing +if command -v nproc &>/dev/null; then + JOBS=$(nproc) +else + JOBS=1 +fi +PATTERNS=() +SUDO=() +STOP=0 +CLEAN=1 +UPDATE=0 +VERBOSE_COMMANDS=0 +VERBOSE_ERRORS=0 +VERBOSE_SKIPPED=0 +VERBOSE_TESTS=0 + # Print usage information usage() { local pad=$(printf "%*s" ${#0} "") color cat </dev/null; then - JOBS=$(nproc) - else - JOBS=1 - fi - fi - # Try to resolve the path to $BFS before we cd, while also supporting # --bfs="./bin/bfs -S ids" read -a BFS <<<"${BFS:-$BIN/bfs}" -- cgit v1.2.3