mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 21:27:53 +00:00
11 lines
350 B
Bash
Executable file
11 lines
350 B
Bash
Executable file
#!/bin/bash
|
|
|
|
echo '### Test niceload exit code'
|
|
niceload "perl -e 'exit(3)'" ; echo $? eq 3
|
|
niceload "perl -e 'exit(0)'" ; echo $? eq 0
|
|
|
|
echo '### Test -p'
|
|
perl -e '$|=1;while($t++<3){sleep(1);print "."}' &
|
|
# The above should be suspended for at least 4 seconds
|
|
stdout /usr/bin/time -f %e niceload -D -l -2 -p $! | perl -ne '$_ > 6 and print "OK\n"'
|