2
0
mirror of https://github.com/boostorg/build.git synced 2026-01-19 04:02:14 +00:00
Files
build/test/core_bindrule.py
Nikita Kniazev d1d7a6a16b MSYS2 fixes and CI (#298)
I've setup CI on GHA because it is much more convenient using their action script.

This covers different Mingw setups and it does not fail on PCH tests like Mingw-w64 one installed by default on GHA/Azure (either because GCC exe there was built without ASLR or is a new recent version which supports PCH relocation).
2023-07-16 08:33:13 -05:00

46 lines
996 B
Python
Executable File

#!/usr/bin/env python3
# Copyright 2001 Dave Abrahams
# 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)
import BoostBuild
import os
t = BoostBuild.Tester(["-d1"], pass_toolset=0)
t.write("subdir1/file-to-bind", "# This file intentionally left blank")
t.write("file.jam", """\
rule do-nothing ( target : source )
{
DEPENDS $(target) : $(source) ;
}
actions quietly do-nothing { }
# Make a non-file target which depends on a file that exists
NOTFILE fake-target ;
SEARCH on file-to-bind = subdir1 ;
do-nothing fake-target : file-to-bind ;
# Set jam up to call our bind-rule
BINDRULE = bind-rule ;
rule bind-rule ( target : path )
{
ECHO "found:" $(target) at $(path:T) ;
}
DEPENDS all : fake-target ;
""")
t.run_build_system(["-ffile.jam"], stdout="""\
found: all at all
found: file-to-bind at subdir1/file-to-bind
...found 3 targets...
""")
t.cleanup()