2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

Add a test for the "bjam foo.o" feature.

[SVN r32429]
This commit is contained in:
Vladimir Prus
2006-01-27 10:34:58 +00:00
parent 67ff0ed2a5
commit dd110d3c34
2 changed files with 44 additions and 0 deletions

43
v2/test/build_file.py Normal file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/python
# Copyright (C) Vladimir Prus 2006.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# Tests that we can build a file (not target), by it's name
from BoostBuild import Tester, List
# Create a temporary working directory
t = Tester()
# Create the needed files
t.write("Jamroot", """
exe hello : hello.cpp ;
build-project sub ;
""")
t.write("hello.cpp", """
int main()
{
return 0;
}
""")
t.write("sub/Jamfile", """
exe hello : hello.cpp ;
""")
t.write("sub/hello.cpp", """
int main()
{
return 0;
}
""")
t.run_build_system(t.adjust_suffix("hello.obj"))
t.expect_addition("bin/$toolset/debug/hello.obj")
t.expect_addition("sub/bin/$toolset/debug/hello.obj")
t.expect_nothing_more()
# Remove temporary directories
t.cleanup()

View File

@@ -133,6 +133,7 @@ tests = [ "rebuilds",
"notfile",
"project_root_rule",
"resolution",
"build_file",
]
if os.name == 'posix':