summaryrefslogtreecommitdiff
path: root/python/pymake/tests/parallel-submake.mk
diff options
context:
space:
mode:
Diffstat (limited to 'python/pymake/tests/parallel-submake.mk')
-rw-r--r--python/pymake/tests/parallel-submake.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/python/pymake/tests/parallel-submake.mk b/python/pymake/tests/parallel-submake.mk
new file mode 100644
index 000000000..65cb2cf7c
--- /dev/null
+++ b/python/pymake/tests/parallel-submake.mk
@@ -0,0 +1,17 @@
+#T commandline: ['-j2']
+
+# A submake shouldn't return control to the parent until it has actually finished doing everything.
+
+all:
+ -$(MAKE) -f $(TESTPATH)/parallel-submake.mk subtarget
+ cat results
+ test "$$(cat results)" = "0123"
+ @echo TEST-PASS
+
+subtarget: succeed-slowly fail-quickly
+
+succeed-slowly:
+ printf 0 >>results; sleep 1; printf 1 >>results; sleep 1; printf 2 >>results; sleep 1; printf 3 >>results
+
+fail-quickly:
+ exit 1