mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
39 lines
1.8 KiB
Plaintext
39 lines
1.8 KiB
Plaintext
# The seq 30000000 should take > 1 cpu sec to run.
|
|
echo '### --soft -f and test if child is actually suspended and thus takes longer'
|
|
### --soft -f and test if child is actually suspended and thus takes longer
|
|
niceload --soft -f 0.5 'seq 30000000 | nice wc;echo This should finish last' & (sleep 1; seq 30000000 | nice wc;echo This should finish first) & wait
|
|
30000000 30000000 258888897
|
|
This should finish first
|
|
30000000 30000000 258888897
|
|
This should finish last
|
|
echo '### niceload with no arguments should give no output'
|
|
### niceload with no arguments should give no output
|
|
niceload
|
|
echo '### Test -t and -s'
|
|
### Test -t and -s
|
|
# This should sleep 2*1s and run 2*2s
|
|
niceload -v -t 1 -s 2 sleep 4.5
|
|
Sleeping 1s
|
|
Running 2s
|
|
Sleeping 1s
|
|
Running 2s
|
|
echo 'bug #38908: niceload: Ctrl-C/TERM should resume jobs if using -p - Order may change, but not output'
|
|
bug #38908: niceload: Ctrl-C/TERM should resume jobs if using -p - Order may change, but not output
|
|
# This should take 10 seconds to run + delay from niceload
|
|
# niceload killed after 1 sec => The delay from niceload should be no more than 1 second
|
|
stdout /usr/bin/time -f %e perl -e 'for(1..100) { select(undef, undef, undef, 0.1); } print "done\n"' | int & niceload -vt 1 -s 10 -p $! & export A=$!; sleep 2; kill -s TERM $A; wait; echo Finished
|
|
done
|
|
10
|
|
Finished
|
|
Sleeping 1s
|
|
Running 10s
|
|
echo 'bug #38908: niceload: Ctrl-C should resume jobs if using -p'
|
|
bug #38908: niceload: Ctrl-C should resume jobs if using -p
|
|
# This should take 10 seconds to run + delay from niceload
|
|
# niceload killed after 1 sec => The delay from niceload should be no more than 1 second
|
|
stdout /usr/bin/time -f %e perl -e 'for(1..100) { select(undef, undef, undef, 0.1); } print "done\n"' | int & niceload -vt 1 -s 10 -p $! & export A=$!; sleep 2; kill -s INT $A; wait
|
|
done
|
|
10
|
|
Sleeping 1s
|
|
Running 10s
|