File tree Expand file tree Collapse file tree 2 files changed +12
-19
lines changed
Expand file tree Collapse file tree 2 files changed +12
-19
lines changed Original file line number Diff line number Diff line change 33#
44
55# spell-checker:ignore (paths) abmon deref discrim eacces getlimits getopt ginstall inacc infloop inotify reflink ; (misc) INT_OFLOW OFLOW
6- # spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) gnproc greadlink gsed multihardlink texinfo CARGOFLAGS
6+ # spell-checker:ignore baddecode submodules xstrtol distros ; (vars/env) SRCDIR vdir rcexp xpart dired OSTYPE ; (utils) greadlink gsed multihardlink texinfo CARGOFLAGS
77# spell-checker:ignore openat TOCTOU CFLAGS
88# spell-checker:ignore hfsplus casefold chattr
99
1010set -e
1111
12- # Use system's GNU version for make, nproc , readlink and sed on *BSD and macOS
12+ # Use GNU version for make, readlink and sed on *BSD and macOS
1313MAKE=$( command -v gmake|| command -v make)
14- NPROC=$( command -v gnproc|| command -v nproc)
15- READLINK=$( command -v greadlink|| command -v readlink)
14+ READLINK=$( command -v greadlink|| command -v readlink) # todo: Use our readlink to remove a dependency
1615SED=$( command -v gsed|| command -v sed)
1716
1817SYSTEM_TIMEOUT=$( command -v timeout)
141140 " ${SED} " -i ' s|^"\$@|' " ${SYSTEM_TIMEOUT} " ' 600 "\$@|' build-aux/test-driver
142141 # Use a better diff
143142 " ${SED} " -i ' s|diff -c|diff -u|g' tests/Coreutils.pm
144- " ${MAKE} " -j " $( " ${NPROC} " ) "
143+ # Use GNU nproc for *BSD and macOS
144+ " ${MAKE} " -j " $( " ${UU_BUILD_DIR} /nproc" ) "
145145
146146 # Handle generated factor tests
147147 t_first=00
Original file line number Diff line number Diff line change 22# `run-gnu-test.bash [TEST]`
33# run GNU test (or all tests if TEST is missing/null)
44
5- # spell-checker:ignore (env/vars) GNULIB SRCDIR SUBDIRS OSTYPE ; (utils) shellcheck gnproc greadlink
5+ # spell-checker:ignore (env/vars) GNULIB SRCDIR SUBDIRS OSTYPE ; (utils) shellcheck greadlink
66
77# ref: [How the GNU coreutils are tested](https://www.pixelbeat.org/docs/coreutils-testing.html) @@ <https://archive.is/p2ITW>
88# * note: to run a single test => `make check TESTS=PATH/TO/TEST/SCRIPT SUBDIRS=. VERBOSE=yes`
99
10- # Use GNU version for make, nproc, readlink on *BSD
11- case " $OSTYPE " in
12- * bsd* )
13- MAKE=" gmake"
14- NPROC=" gnproc"
15- READLINK=" greadlink"
16- ;;
17- * )
18- MAKE=" make"
19- NPROC=" nproc"
20- READLINK=" readlink"
21- ;;
22- esac
10+ # Use GNU make, readlink on *BSD
11+ MAKE=$( command -v gmake|| command -v make)
12+ READLINK=$( command -v greadlink|| command -v readlink) # Use our readlink to remove a dependency
2313
2414ME_dir=" $( dirname -- " $( " ${READLINK} " -fm -- " $0 " ) " ) "
2515REPO_main_dir=" $( dirname -- " ${ME_dir} " ) "
@@ -37,6 +27,9 @@ path_GNU="$("${READLINK}" -fm -- "${path_GNU:-${path_UUTILS}/../gnu}")"
3727echo " path_UUTILS='${path_UUTILS} '"
3828echo " path_GNU='${path_GNU} '"
3929
30+ # Use GNU compatible nproc for *BSD
31+ NPROC=" ${path_UUTILS} /nproc"
32+
4033# ##
4134
4235cd " ${path_GNU} " && echo " [ pwd:'${PWD} ' ]"
You can’t perform that action at this time.
0 commit comments