mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 05:07:54 +00:00
Passes testsuite.
This commit is contained in:
parent
b35e5ff721
commit
398e78e8cd
|
@ -13,20 +13,20 @@ parallel --semaphorename `tty` --semaphore --wait
|
|||
echo done
|
||||
|
||||
echo '### Test semaphore 2 jobs running simultaneously'
|
||||
parallel -u -j2 --semaphore 'echo job1a; sleep 1; echo job1b'
|
||||
sleep 0.1
|
||||
parallel -u -j2 --semaphore 'echo job2a; sleep 1; echo job2b'
|
||||
sleep 0.1
|
||||
parallel -u -j2 --semaphore 'echo job3a; sleep 1; echo job3b'
|
||||
parallel -u -j2 --semaphore 'echo job1a 1; sleep 1; echo job1b 3'
|
||||
sleep 0.2
|
||||
parallel -u -j2 --semaphore 'echo job2a 2; sleep 1; echo job2b 5'
|
||||
sleep 0.2
|
||||
parallel -u -j2 --semaphore 'echo job3a 4; sleep 1; echo job3b 6'
|
||||
parallel --semaphore --wait
|
||||
echo done
|
||||
|
||||
echo '### Test if parallel invoked as sem will run parallel --semaphore'
|
||||
sem -u -j2 'echo job1a; sleep 1; echo job1b'
|
||||
sleep 0.1
|
||||
sem -u -j2 'echo job2a; sleep 1; echo job2b'
|
||||
sleep 0.1
|
||||
sem -u -j2 'echo job3a; sleep 1; echo job3b'
|
||||
sem -u -j2 'echo job1a 1; sleep 1; echo job1b 3'
|
||||
sleep 0.2
|
||||
sem -u -j2 'echo job2a 2; sleep 1; echo job2b 5'
|
||||
sleep 0.2
|
||||
sem -u -j2 'echo job3a 4; sleep 1; echo job3b 6'
|
||||
sem --wait
|
||||
echo done
|
||||
|
||||
|
|
|
@ -43,20 +43,20 @@ done
|
|||
20
|
||||
done
|
||||
### Test semaphore 2 jobs running simultaneously
|
||||
job1a
|
||||
job2a
|
||||
job1b
|
||||
job3a
|
||||
job2b
|
||||
job3b
|
||||
job1a 1
|
||||
job2a 2
|
||||
job1b 3
|
||||
job3a 4
|
||||
job2b 5
|
||||
job3b 6
|
||||
done
|
||||
### Test if parallel invoked as sem will run parallel --semaphore
|
||||
job1a
|
||||
job2a
|
||||
job1b
|
||||
job2b
|
||||
job3a
|
||||
job3b
|
||||
job1a 1
|
||||
job2a 2
|
||||
job1b 3
|
||||
job3a 4
|
||||
job2b 5
|
||||
job3b 6
|
||||
done
|
||||
### Test similar example as from man page - run 2 jobs simultaneously
|
||||
Expect done: 1 2 5 3 4
|
||||
|
|
Loading…
Reference in a new issue