1#!/usr/bin/python 2 3# Copyright (C) Vladimir Prus 2003. 4# Distributed under the Boost Software License, Version 1.0. 5# (See accompanying file LICENSE_1_0.txt or copy at 6# http://www.boost.org/LICENSE_1_0.txt) 7 8# Test for the regression testing framework. 9 10import BoostBuild 11 12# Create a temporary working directory. 13t = BoostBuild.Tester(["-d0"], use_test_config=False) 14 15t.write("Jamroot.jam", """ 16project 17 : 18 : usage-requirements <define>TEST=1 19 : default-build <link>static 20; 21message hello : "Hello World!" ; 22alias hello : : <link>shared ; 23obj test : test.cpp hello : <link>static ; 24""") 25 26t.write("test.cpp", """ 27#ifndef TEST 28#error TEST not defined 29#endif 30""") 31 32t.run_build_system(["test"], stdout="""Hello World! 33""") 34 35t.expect_addition("bin/$toolset/link-static*/test.obj") 36t.expect_nothing_more() 37 38t.cleanup() 39