logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git
commit: 245fd577711b818e053fc686117a979881a48050
parent 41cba96403764a1c6db5a35d9e9bd15b0f328200
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 22 Oct 2024 05:28:10 +0200

test-cmd/nice.sh: Skip if nice isn't at 0

Diffstat:

Mtest-cmd/nice.sh14++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/test-cmd/nice.sh b/test-cmd/nice.sh @@ -4,11 +4,21 @@ WD="$(dirname "$0")/../" target="${WD}/cmd/nice" +getprio="${WD}/test-cmd/getpriority" plans=4 -. "${WD}/test-cmd/tap.sh" +if ! test -f "${getprio}"; then + echo '1..0 # SKIP: missing executable: ' "${getprio}" + exit 0 +fi -getprio="${WD}/test-cmd/getpriority" +curr_nice=$("${getprio}") +if [ "$curr_nice" != "getpriority: 0" ]; then + echo '1..0 # SKIP: need 0 nice value, got: ' "${curr_nice}" + exit 0 +fi + +. "${WD}/test-cmd/tap.sh" t noargs ''