1#!/usr/bin/python 2 3# Copyright (C) Vladimir Prus 2006. 4# Distributed under the Boost Software License, Version 1.0. (See 5# accompanying file LICENSE_1_0.txt or copy at 6# http://www.boost.org/LICENSE_1_0.txt) 7 8# Tests add-pre-build-hook and add-post-build-hook 9 10import BoostBuild 11 12t = BoostBuild.Tester() 13 14t.write("Jamroot.jam", """ 15import build-system ; 16build-system.add-pre-build-hook pre-build ; 17build-system.add-post-build-hook post-build ; 18 19rule pre-build ( ) 20{ 21 ECHO "in" pre-build hook ; 22} 23 24rule post-build ( okay ? ) 25{ 26 ECHO "in" post-build hook $(okay) ; 27} 28 29message show : building main targets ; 30""") 31 32t.run_build_system(stdout="""\ 33building main targets 34in pre-build hook 35...found 1 target... 36in post-build hook ok 37""") 38 39t.cleanup() 40