summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-03-24 22:30:52 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-03-24 22:52:20 +0300
commitf312d23f4598097b56883d95d598dc4b502498b7 (patch)
tree406dc4a095d1b5ba70afb08953c786b370dbf351 /tests
parent5e4b4e1c1142a747fa1ba6286639b4d82d80f4ce (diff)
downloadgunmake-master.tar.gz
Implemented .WAITHEADmaster
Based on this patch: http://lists.gnu.org/archive/html/help-make/2005-04/msg00091.html Test file (wait.mk): simple: 1 .WAIT 2 @echo $@ 1: @sleep 2; echo $@ 2: @echo $@ run: ./make --sun -f wait.mk -j50 simple Output: 1 2 simple
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/features/sun-wait34
1 files changed, 34 insertions, 0 deletions
diff --git a/tests/scripts/features/sun-wait b/tests/scripts/features/sun-wait
new file mode 100644
index 0000000..bc2fab6
--- /dev/null
+++ b/tests/scripts/features/sun-wait
@@ -0,0 +1,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;