2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 00:12:11 +00:00
Files
build/test/project_test3.py
Vladimir Prus e76db483d1 Using targets from other projects implemented.
* new/project.jam (lookup): Bugfixes. (find-target): Attempt to load
        project specified by project id.
        Project module rules:
            project: Allow empty id.
            use-project: New rule.
    * new/targets.jam: (basic-target.generate-source): Correct a bug in
        separating target id from extra properties.


[SVN r14341]
2002-07-08 10:26:57 +00:00

85 lines
2.6 KiB
Python

#!/usr/bin/python
from BoostBuild import Tester
import os
from string import strip
t = Tester()
# First check some startup
t.set_tree("project-test3")
os.remove("project-root.jam")
t.run_build_system(status=1, stdout=
"""Failed to find the project root for directory '.'.
Did not find a project-root.jam file there or in any of its parent directories.
Please consult the documentation at 'http://www.boost.org'.
""")
t.set_tree("project-test3")
t.run_build_system()
t.expect_addition("bin/gcc/debug/threading-single/a.obj")
t.expect_content("bin/gcc/debug/threading-single/a.obj",
"""gcc/debug/threading-single
a.cpp
""")
t.expect_addition("bin/gcc/debug/threading-single/a.exe")
t.expect_content("bin/gcc/debug/threading-single/a.exe",
"gcc/debug/threading-single\n" +
"bin/gcc/debug/threading-single/a.obj lib/bin/gcc/debug/threading-single/b.obj " +
"lib2/bin/gcc/debug/threading-single/c.obj lib2/bin/gcc/debug/threading-single/d.obj " +
"lib2/helper/bin/gcc/debug/threading-single/e.obj\n"
)
t.expect_addition("lib/bin/gcc/debug/threading-single/b.obj")
t.expect_content("lib/bin/gcc/debug/threading-single/b.obj",
"""gcc/debug/threading-single
lib/b.cpp
""")
t.expect_addition("lib/bin/gcc/debug/threading-single/m.exe")
t.expect_content("lib/bin/gcc/debug/threading-single/m.exe",
"""gcc/debug/threading-single
lib/bin/gcc/debug/threading-single/b.obj lib2/bin/gcc/debug/threading-single/c.obj
""")
t.expect_addition("lib2/bin/gcc/debug/threading-single/c.obj")
t.expect_content("lib2/bin/gcc/debug/threading-single/c.obj",
"""gcc/debug/threading-single
lib2/c.cpp
""")
t.expect_addition("lib2/bin/gcc/debug/threading-single/d.obj")
t.expect_content("lib2/bin/gcc/debug/threading-single/d.obj",
"""gcc/debug/threading-single
lib2/d.cpp
""")
t.expect_addition("lib2/bin/gcc/debug/threading-single/l.exe")
t.expect_content("lib2/bin/gcc/debug/threading-single/l.exe",
"""gcc/debug/threading-single
lib2/bin/gcc/debug/threading-single/c.obj bin/gcc/debug/threading-single/a.obj
""")
t.expect_addition("lib2/helper/bin/gcc/debug/threading-single/e.obj")
t.expect_content("lib2/helper/bin/gcc/debug/threading-single/e.obj",
"""gcc/debug/threading-single
lib2/helper/e.cpp
""")
t.touch("a.cpp")
t.run_build_system()
t.expect_touch(["bin/gcc/debug/threading-single/a.obj",
"bin/gcc/debug/threading-single/a.exe",
"lib2/bin/gcc/debug/threading-single/l.exe"])
t.run_build_system(extra_args="release optimization=off,on")
t.expect_addition([ "bin/gcc/release/threading-single/a.exe",
"bin/gcc/release/threading-single/a.obj",
"bin/gcc/release/optimization-off/threading-single/a.exe",
"bin/gcc/release/optimization-off/threading-single/a.obj"])