mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-23 06:27:55 +00:00
8bec8de5df
Passes testsuite.
38 lines
1.1 KiB
Plaintext
38 lines
1.1 KiB
Plaintext
### Test -p --interactive
|
|
spawn /tmp/parallel-script-for-expect
|
|
sleep 0.1; echo opt-p 1 ?...y
|
|
sleep 0.1; echo opt-p 2 ?...n
|
|
sleep 0.1; echo opt-p 3 ?...y
|
|
opt-p 1
|
|
opt-p 3
|
|
sleep 0.1; echo opt--interactive 1 ?...y
|
|
sleep 0.1; echo opt--interactive 2 ?...n
|
|
sleep 0.1; echo opt--interactive 3 ?...y
|
|
opt--interactive 1
|
|
opt--interactive 3
|
|
|
|
echo '### Test killing children with --timeout and exit value (failed if timed out)'
|
|
### Test killing children with --timeout and exit value (failed if timed out)
|
|
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc; parallel --timeout 3 'true {} ; for i in `seq 100 120`; do bash -c "(sleep $i)" & sleep $i & done; wait; echo No good' ::: 1000000000 1000000001 ; echo $?; sleep 2; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
|
|
0 0 0
|
|
2
|
|
0 0 0
|
|
xargs Expect: 3 1
|
|
3
|
|
1
|
|
parallel Expect: 3 1 via psedotty 2
|
|
via pseudotty
|
|
via pseudotty
|
|
1
|
|
xargs Expect: 1 3
|
|
1
|
|
3
|
|
parallel Expect: 1 3 2 via pseudotty
|
|
via pseudotty
|
|
1
|
|
via pseudotty
|
|
### Hans found a bug giving unitialized variable
|
|
gzip /tmp/parallel_f1
|
|
gzip /tmp/parallel_f2'
|
|
'
|