2
0
mirror of https://github.com/boostorg/build.git synced 2026-01-19 16:12:14 +00:00
Files
build/test/core_parallel_multifile_actions_2.py
Rene Rivera 6c1a6557b0 Add list of failed and skipped targets to tail summary.
This expands out the failed and skipped summary tail lines to also include a sorted list of action and targets of the corresponding failed and skipped targets. This makes it easier to see them and to further search for individual ones in teh rest of the output. It also makes it possible to quickly retry specific targets.

fixes #196
2024-03-06 08:39:42 -06:00

73 lines
1.6 KiB
Python
Executable File

#!/usr/bin/env python3
# Copyright 2008 Jurko Gospodnetic, Vladimir Prus
# Copyright 2011 Steven Watanabe
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE.txt or https://www.bfgroup.xyz/b2/LICENSE.txt)
# Added to guard against a bug causing targets to be used before they
# themselves have finished building. This used to happen for targets built by a
# multi-file action that got triggered by another target, except when the
# target triggering the action was the first one in the list of targets
# produced by that action.
#
# Example:
# When target A and target B were declared as created by a single action with
# A being the first one listed, and target B triggered running that action
# then, while the action was still running, target A was already reporting as
# being built causing other targets depending on target A to be built
# prematurely.
import BoostBuild
t = BoostBuild.Tester(pass_toolset=0)
t.write("sleep.bat", """\
::@timeout /T %1 /NOBREAK >nul
@ping 127.0.0.1 -n 2 -w 1000 >nul
@ping 127.0.0.1 -n %1 -w 1000 >nul
@exit /B 0
""")
t.write("file.jam", """\
if $(NT)
{
SLEEP = @call sleep.bat ;
}
else
{
SLEEP = sleep ;
}
actions link
{
$(SLEEP) 1
echo 001 - linked
}
link dll lib ;
actions install
{
echo 002 - installed
}
install installed_dll : dll ;
DEPENDS installed_dll : dll ;
DEPENDS all : lib installed_dll ;
""")
t.run_build_system(["-ffile.jam", "-j2"], stdout="""\
...found 4 targets...
...updating 3 targets...
link dll
001 - linked
install installed_dll
002 - installed
...updated 3 targets...
""")
t.cleanup()