Release 1.39.0
[boost.git] / Boost_1_39_0 / tools / jam / test / parallel_multifile_actions_2.jam
bloba85cf63fdb37cf59a71d0cb6a3c252f803abf65d
1 # Copyright 2008 Jurko Gospodnetic, Vladimir Prus
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
5 #   Added to guard against a bug causing targets to be used before they
6 # themselves have finished building. This used to happen for targets built by a
7 # multi-file action that got triggered by another target, except when the target
8 # triggering the action was the first one in the list of targets produced by
9 # that action.
11 # Example:
12 #   When target A and target B were declared as created by a single action with
13 # A being the first one listed, and target B triggered running that action then
14 # while the action was still running, target A was already reporting as being
15 # built causing other targets depending on target A to be built prematurely.
17 if ! $(BJAM_SUBTEST)
19     ECHO --- Testing -jN parallel execution of multi-file actions - 2... ;
21     assert "...found 4 targets...
22 ...updating 3 targets...
23 link dll
24 001 - linked
25 install installed_dll
26 002 - installed
27 ...updated 3 targets...
28 " : (==) : [ SHELL "\"$(ARGV[1])\" -f parallel_multifile_actions_2.jam -sBJAM_SUBTEST=1 -j2" ] ;
30 else
32     actions link
33     {
34         sleep 1
35         echo 001 - linked
36     }
38     link dll lib ;
40     actions install
41     {
42         echo 002 - installed
43     }
45     install installed_dll : dll ;
46     DEPENDS installed_dll : dll ;
48     DEPENDS all : lib installed_dll ;