2010-08-16 22:25:11 +00:00
|
|
|
### Test mutex. This should not mix output
|
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
19
|
|
|
|
20
|
|
|
|
done
|
2010-08-17 06:53:46 +00:00
|
|
|
### Test default id = --id `tty` and --semaphorename
|
2010-08-16 22:25:11 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
19
|
|
|
|
20
|
|
|
|
done
|
|
|
|
### Test semaphore 2 jobs running simultaneously
|
2012-05-13 14:32:46 +00:00
|
|
|
job1a 1
|
|
|
|
job2a 2
|
|
|
|
job1b 3
|
|
|
|
job3a 4
|
|
|
|
job2b 5
|
|
|
|
job3b 6
|
2010-08-16 22:25:11 +00:00
|
|
|
done
|
|
|
|
### Test if parallel invoked as sem will run parallel --semaphore
|
2012-05-13 14:32:46 +00:00
|
|
|
job1a 1
|
|
|
|
job2a 2
|
|
|
|
job1b 3
|
|
|
|
job3a 4
|
|
|
|
job2b 5
|
|
|
|
job3b 6
|
2010-08-16 22:25:11 +00:00
|
|
|
done
|
2010-08-21 23:29:26 +00:00
|
|
|
### Test similar example as from man page - run 2 jobs simultaneously
|
|
|
|
Expect done: 1 2 5 3 4
|
|
|
|
Scheduling 5
|
|
|
|
Scheduling 1
|
|
|
|
starting 5
|
|
|
|
Scheduling 2
|
|
|
|
starting 1
|
|
|
|
done 1
|
|
|
|
Scheduling 3
|
|
|
|
starting 2
|
|
|
|
done 2
|
|
|
|
Scheduling 4
|
|
|
|
starting 3
|
|
|
|
done 5
|
|
|
|
starting 4
|
|
|
|
done 3
|
|
|
|
done 4
|
|
|
|
### Test --fg followed by --bg
|
2010-08-17 06:53:46 +00:00
|
|
|
1
|
|
|
|
2
|
|
|
|
3
|
|
|
|
4
|
|
|
|
5
|
|
|
|
6
|
|
|
|
7
|
|
|
|
8
|
|
|
|
9
|
|
|
|
10
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
|
14
|
|
|
|
15
|
|
|
|
16
|
|
|
|
17
|
|
|
|
18
|
|
|
|
19
|
|
|
|
20
|
|
|
|
21
|
|
|
|
22
|
|
|
|
23
|
|
|
|
24
|
|
|
|
25
|
|
|
|
26
|
|
|
|
27
|
|
|
|
28
|
|
|
|
29
|
|
|
|
30
|
|
|
|
31
|
|
|
|
32
|
|
|
|
33
|
|
|
|
34
|
|
|
|
35
|
|
|
|
36
|
|
|
|
37
|
|
|
|
38
|
|
|
|
39
|
|
|
|
40
|
2011-06-22 22:12:16 +00:00
|
|
|
### Test bug #33621: --bg -p should give an error message
|
|
|
|
parallel: Jobs running in the background cannot be interactive.
|