mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-05 08:10:15 +02:00
tests: nproc: support referencing of external command
* tests/nproc/nproc-quota.sh: Use command -v nproc instead of $abs_top_builddir for external usage of tests. Also quote "$nproc" usage, to support spaces in path. Link: https://github.com/coreutils/coreutils/pull/310
This commit is contained in:
@@ -44,10 +44,10 @@ ROOT=cgroup
|
||||
echo 'max 100000' > $ROOT/sys/fs/cgroup/foo/cpu.max # ignored
|
||||
} || framework_failure_
|
||||
|
||||
nproc=$abs_top_builddir/src/nproc$EXEEXT
|
||||
cp --parents $(ldd $nproc | grep -o '/[^ ]*') $ROOT ||
|
||||
nproc=$(command -v nproc)
|
||||
cp --parents $(ldd "$nproc" | grep -o '/[^ ]*') $ROOT ||
|
||||
skip_ 'Failed to copy nproc libs to chroot'
|
||||
cp $nproc $ROOT || framework_failure_
|
||||
cp "$nproc" $ROOT || framework_failure_
|
||||
|
||||
NPROC() {
|
||||
IFS=': ' read key policy < $ROOT/proc/self/sched
|
||||
|
||||
Reference in New Issue
Block a user