Passes testsuite.

This commit is contained in:
Ole Tange 2012-05-13 16:32:46 +02:00
parent b35e5ff721
commit 398e78e8cd
2 changed files with 22 additions and 22 deletions

View file

@ -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

View file

@ -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