summaryrefslogtreecommitdiff
path: root/tests/scripts/features/sun-wait
blob: bc2fab6f291ea90945812813cd8df6dd5bd6ae1e (plain)
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
#                                                                    -*-perl-*-
$description = "Check .WAIT special target";

$details = "";

run_make_test('
one:
	@sleep 2; echo $@
two:
	@echo $@

three: one .WAIT two
	@echo $@

four: one two
	@echo $@

',
'--sun three', # note: one job
"one\ntwo\nthree");

# Same file, but 3 jobs, must be the same result due to .WAIT:
run_make_test(undef, '--sun -j3 three', "one\ntwo\nthree");

# Same file, but "two" should not depend on "one":
run_make_test(undef, '--sun two', "two");

# Same file, but "two" should end earlier:
run_make_test(undef, '--sun -j3 four', "two\none\nfour");
# Same file, but "two" should end earlier even in mornal mode ;-)
run_make_test(undef, '-j3 four', "two\none\nfour");

# This tells the test driver that the perl test script executed properly.
1;