2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 00:32:11 +00:00
Files
build/test/stage.py
Vladimir Prus 06b75a7d71 Bugfix. Make values of path-constants into absolute paths, so that they
can be used without problems as values of path features.


[SVN r17908]
2003-03-14 07:50:19 +00:00

56 lines
1.1 KiB
Python

#!/usr/bin/python
# Test staging
from BoostBuild import Tester
t = Tester()
t.write("project-root.jam", "import gcc ;")
t.write("Jamfile", """
lib a : a.cpp ;
stage dist : a a.h auxilliary/1 ;
""")
t.write("a.cpp", "")
t.write("a.h", "")
t.write("auxilliary/1", "")
t.run_build_system()
t.expect_addition(["dist/a.dll", "dist/a.h", "dist/1"])
# Test the <location> property
t.write("Jamfile", """
lib a : a.cpp ;
stage dist : a
: <variant>debug:<location>ds <variant>release:<location>rs
;
""")
t.run_build_system()
t.expect_addition("ds/a.dll")
t.run_build_system("release")
t.expect_addition("rs/a.dll")
# Test the <location> property in subprojects.
# Thanks to Kirill Lapshin for bug report.
t.write("project-root.jam", """
path-constant DIST : dist ;
""")
t.write("Jamfile", "build-project d ;")
t.write("d/Jamfile","""
exe a : a.cpp ;
stage dist : a : <location>$(DIST) ;
""")
t.write("d/a.cpp", "int main() { return 0;}\n")
t.run_build_system()
t.expect_addition("dist/a.exe")
t.rm("dist")
t.run_build_system(subdir="d")
t.expect_addition("dist/a.exe")
t.cleanup()