2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-01 20:32:17 +00:00
Files
build/test/wrapper.py
Vladimir Prus b91aafa44c Revert the previous behaviour of unit-test: it does not store output into
a file but shows it on the screen. However, the proper setting of run
paths is not done for unit-test too.


[SVN r25035]
2004-09-13 09:32:37 +00:00

48 lines
954 B
Python

#!/usr/bin/python
# Copyright (C) Vladimir Prus 2003. Permission to copy, use, modify, sell and
# distribute this software is granted provided this copyright notice appears in
# all copies. This software is provided "as is" without express or implied
# warranty, and with no claim as to its suitability for any purpose.
# Test that the user can define his own rule that will call builtin main
# target rule and that this will work.
from BoostBuild import Tester, List
t = Tester()
t.write("Jamfile", """ my-test : test.cpp ;
""")
t.write("test.cpp", """
int main()
{
return 0;
}
""")
t.write("project-root.jam", """ using testing ;
rule my-test ( name ? : sources + )
{
{
name ?= test ;
unit-test $(name) : $(sources) ; # /site-config//cppunit /util//testMain ;
}
}
IMPORT $(__name__) : my-test : : my-test ;
""")
t.run_build_system()
t.expect_addition("bin/$toolset/debug/test.passed")
t.cleanup()