1#!/usr/local/bin/python3.8 2 3# Copyright 2007 Rene Rivera. 4# Copyright 2011 Steven Watanabe 5# Distributed under the Boost Software License, Version 1.0. 6# (See accompanying file LICENSE_1_0.txt or copy at 7# http://www.boost.org/LICENSE_1_0.txt) 8 9import BoostBuild 10 11t = BoostBuild.Tester(pass_toolset=0) 12 13t.write("sleep.bat", """\ 14::@timeout /T %1 /NOBREAK >nul 15@ping 127.0.0.1 -n 2 -w 1000 >nul 16@ping 127.0.0.1 -n %1 -w 1000 >nul 17@exit /B 0 18""") 19 20t.write("file.jam", """\ 21if $(NT) 22{ 23 SLEEP = @call sleep.bat ; 24} 25else 26{ 27 SLEEP = sleep ; 28} 29 30actions .a. { 31echo 001 32$(SLEEP) 4 33echo 002 34} 35 36.a. sleeper ; 37 38DEPENDS all : sleeper ; 39""") 40 41t.run_build_system(["-ffile.jam", "-d1", "-l2"], status=1) 42t.expect_output_lines("2 second time limit exceeded") 43 44t.cleanup() 45