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:
43
v2/test/build_file.py
Normal file
43
v2/test/build_file.py
Normal 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()
|
||||
@@ -133,6 +133,7 @@ tests = [ "rebuilds",
|
||||
"notfile",
|
||||
"project_root_rule",
|
||||
"resolution",
|
||||
"build_file",
|
||||
]
|
||||
|
||||
if os.name == 'posix':
|
||||
|
||||
Reference in New Issue
Block a user