VirtualBox

source: kBuild/vendor/gnumake/current/tests/scripts/options/dash-l@ 3208

最後變更 在這個檔案從3208是 2596,由 bird 提交於 13 年 前

gnumake/current -> 3.82-cvs.

  • 屬性 svn:eol-style 設為 LF
檔案大小: 1.5 KB
 
1# -*-perl-*-
2# Date: Tue, 11 Aug 1992 09:34:26 -0400
3# From: [email protected] (Paul D. Smith)
4
5$description = "Test load balancing (-l) option.";
6
7$details = "\
8This test creates a makefile where all depends on three rules
9which contain the same body. Each rule checks for the existence
10of a temporary file; if it exists an error is generated. If it
11doesn't exist then it is created, the rule sleeps, then deletes
12the temp file again. Thus if any of the rules are run in
13parallel the test will fail. When make is called in this test,
14it is given the -l option with a value of 0.0001. This ensures
15that the load will be above this number and make will therefore
16decide that it cannot run more than one job even though -j 4 was
17also specified on the command line.";
18
19open(MAKEFILE,"> $makefile");
20
21# The Contents of the MAKEFILE ...
22
23print MAKEFILE <<'EOF';
24SHELL = /bin/sh
25
26define test
27if [ ! -f test-file ]; then \
28 echo >> test-file; sleep 2; rm -f test-file; \
29else \
30 echo $@ FAILED; \
31fi
32endef
33
34all : ONE TWO THREE
35ONE : ; @$(test)
36TWO : ; @$(test)
37THREE : ; @$(test)
38EOF
39
40
41# END of Contents of MAKEFILE
42
43close(MAKEFILE);
44
45$mkoptions = "-l 0.0001";
46$mkoptions .= " -j 4" if ($parallel_jobs);
47
48# We have to wait longer than the default (5s).
49&run_make_with_options($makefile, $mkoptions, &get_logfile, 0, 8);
50
51$slurp = &read_file_into_string (&get_logfile(1));
52if ($slurp !~ /cannot enforce load limit/) {
53 &compare_output("", &get_logfile(1));
54}
55
561;
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette